开始接触java与android,实现了第一个功能:自定义AlertDialog。先上代码:
public void jsmethod_showAlert(final UZModuleContext moduleContext){
final AlertDialog biuAlert = new AlertDialog.Builder(context()).create();
final JSONObject ret = new JSONObject();
int layoutId = UZResourcesIDFinder.getResLayoutID("alert_test");
View testLayout = View.inflate(context(), layoutId, null);
int btnId1 = UZResourcesIDFinder.getResIdID("nBtn");
Button btn1 = (Button) testLayout.findViewById(btnId1);
int btnId2 = UZResourcesIDFinder.getResIdID("oBtn");
Button btn2