推送消息跳转
This commit is contained in:
20
app/src/main/java/com/gh/common/util/ClassUtils.java
Normal file
20
app/src/main/java/com/gh/common/util/ClassUtils.java
Normal file
@ -0,0 +1,20 @@
|
||||
package com.gh.common.util;
|
||||
|
||||
|
||||
public class ClassUtils {
|
||||
|
||||
public static Class<?> forName(String name) {
|
||||
if ("NewsActivity".equals(name)) {
|
||||
name = "NewsDetailActivity";
|
||||
} else if ("GameDetailsActivity".equals(name)) {
|
||||
name = "GameDetailActivity";
|
||||
}
|
||||
try {
|
||||
return Class.forName("com.gh.gamecenter." + name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user