initial commit

This commit is contained in:
hyb1996
2017-01-27 09:05:38 +08:00
commit 307dbe8859
105 changed files with 3942 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.stardust.scriptdroid.tool;
/**
* Created by Stardust on 2017/1/23.
*/
public class ClassTool {
public static void loadClass(Class c) {
try {
Class.forName(c.getName());
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
public static void loadClasses(Class... classes) {
for (Class c : classes) {
loadClass(c);
}
}
}

View File

@@ -0,0 +1,16 @@
package com.stardust.scriptdroid.tool;
import android.support.annotation.IdRes;
import android.view.View;
/**
* Created by Stardust on 2017/1/24.
*/
public class ViewTool {
@SuppressWarnings("unchecked")
public static <V extends View> V $(View view, @IdRes int resId) {
return (V) view.findViewById(resId);
}
}