コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mNavigationDrawerFragment =
        (NavigationDrawerFragment)
            getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);

    // Set up the drawer.
    initFragments();
    mNavigationDrawerFragment.setUp(
        R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout));

    //        login(null);
  }
コード例 #2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_debug);
    findViewById(R.id.btn_test).setOnClickListener(this);
    findViewById(R.id.btn_show_crash).setOnClickListener(this);

    //            List<NameValuePair> params = new ArrayList<>();
    //            params.add(new BasicNameValuePair("module", "mypm"));
    //            httpService().exec(BasicHttpRequest.httpPost(Environment.HTTP_ADDRESS, params),
    // new RequestHandler<HttpRequest, HttpResponse>() {
    //                @Override
    //                public void onRequestFinish(HttpRequest req, HttpResponse resp) {
    //                    Log.e(resp.toString());
    //                }
    //
    //                @Override
    //                public void onRequestFailed(HttpRequest req, HttpResponse resp) {
    //                    Log.e(resp.toString());
    //                }
    //            });
  }