Exemple #1
0
 /**
  * 跳转到指定的Activity
  *
  * @param from
  */
 public static void action(Activity from, Class<?> clazz) {
   if (LSystem.getActivity() instanceof LGameAndroid2DActivity) {
     ((LGameAndroid2DActivity) LSystem.getActivity()).setDestroy(false);
   }
   android.content.Intent intent = new android.content.Intent(from, clazz);
   from.startActivity(intent);
 }
Exemple #2
0
 /**
  * 跳转到指定的Activity,并将其设定为最初的Activity
  *
  * @param from
  * @param clazz
  */
 public static void go(Activity from, Class<?> clazz) {
   if (LSystem.getActivity() instanceof LGameAndroid2DActivity) {
     ((LGameAndroid2DActivity) LSystem.getActivity()).setDestroy(false);
   }
   android.content.Intent intent = new android.content.Intent(from, clazz);
   intent.setFlags(android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP);
   from.startActivity(intent);
 }
Exemple #3
0
 public LGameWeb(String url, WebProcess webProcess) {
   this((LGameAndroid2DActivity) LSystem.getActivity(), webProcess, url);
 }
Exemple #4
0
 public LGameWeb(String url) {
   this((LGameAndroid2DActivity) LSystem.getActivity(), null, url);
 }
Exemple #5
0
 public static void runOnUiThread(final Runnable runnable) {
   LSystem.getActivity().runOnUiThread(runnable);
 }
Exemple #6
0
 /**
  * 浏览器访问
  *
  * @param url
  */
 public static void openBrowser(final String url) {
   android.content.Intent i = new android.content.Intent(android.content.Intent.ACTION_VIEW);
   i.setData(android.net.Uri.parse(url));
   LSystem.getActivity().startActivity(i);
 }