Exemplo n.º 1
2
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_second);
    ViewPager pager = (ViewPager) findViewById(R.id.parent);
    pager.setOffscreenPageLimit(1);
    pager.setAdapter(
        new FragmentPagerAdapter(getSupportFragmentManager()) {
          @Override
          public android.support.v4.app.Fragment getItem(int position) {
            return new ExampleFragment(String.valueOf(position));
          }

          @Override
          public int getCount() {
            return 5;
          }
        });
    LifeCycleRetriever.with(this)
        .addListener(
            new LifecycleListener() {
              @Override
              public void onLifeCycleStateChange(@LifeCycle.LifeCycleState int life, int level) {
                Log.e("tag", "ActivityLifeCycle,State:" + haha(life));
              }
            });
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.net_photos);
   initData();
   initView();
 }
Exemplo n.º 3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main3);
    ButterKnife.bind(this);

    initWindow();
    initView();
    setAllClick();
    pager.addOnPageChangeListener(
        new ViewPager.OnPageChangeListener() {
          @Override
          public void onPageScrolled(
              int position, float positionOffset, int positionOffsetPixels) {}

          @Override
          public void onPageSelected(int position) {
            select1.setImageResource(R.drawable.page_indicator_unfocused);
            select2.setImageResource(R.drawable.page_indicator_unfocused);
            if (position == 0) {
              select1.setImageResource(R.drawable.page_indicator_focused);
            } else {
              select2.setImageResource(R.drawable.page_indicator_focused);
            }
          }

          @Override
          public void onPageScrollStateChanged(int state) {}
        });
  }
Exemplo n.º 4
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_note);

    final Intent i = getIntent();
    final int noteIndex = i.getIntExtra(EXTRA_NOTE_INDEX, -1);
    if (noteIndex == -1) {
      Toast.makeText(this, R.string.toast_cant_open_note, Toast.LENGTH_SHORT).show();
      finish();
    }

    final Bundle bundleForFragment = new Bundle();
    bundleForFragment.putInt(BUNDLE_NOTE_INDEX, noteIndex);

    /*
     * TODO:
     * this is temporary. we need to identify the type of note,
     * open the appropriate fragment
     */
    final FragmentManager fm = getSupportFragmentManager();
    Fragment f = new SimpleNoteFragment();
    f.setArguments(bundleForFragment);
    fm.beginTransaction().add(R.id.fragment, f).commit();
  }
Exemplo n.º 5
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    ctx = this;

    initMap();
    initUi();
    initActionBar();
    initLocation();

    updateData();

    mCard = new CardLayout(ctx, detailLinearLayout, mMap, categoryNavigation, categoryPayMent);
    categoryNavigation.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            NavigationController.navigate(
                ctx,
                new LatLng(mMap.getMyLocation().getLatitude(), mMap.getMyLocation().getLongitude()),
                mSelectMarker.getPosition());
          }
        });

    dataHandler = new DataUpdate();
  }
 @Override
 public void onCreate(Bundle icicle) {
   super.onCreate(icicle);
   Utils.showMenu(this);
   initialize();
   if (connection != null && connection.isReadyForConnection()) continueConnecting();
 }
Exemplo n.º 7
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_view_route);
   dbHandler = DatabaseHandler.getInstance(this);
   setUpMapIfNeeded();
 }
Exemplo n.º 8
0
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity_frag);

    if (savedInstanceState == null) {
      FragmentManager manager = getFragmentManager();

      // Start transaction
      FragmentTransaction transaction = manager.beginTransaction();

      // Create fragments
      menu = new MenuFragment();
      main = new NewsListFragment();
      top = new TopFragment();

      // Add fragments
      transaction.add(RIGHT_FRAG, main);
      transaction.add(LEFT_FRAG, menu);
      transaction.add(BOTTOM_FRAG, top);

      transaction.commit();
    }

    if (!ObjectStorage.menuHidden) {
      ScrollView scrollview = (ScrollView) findViewById(R.id.fragleft);
      scrollview.setVisibility(View.VISIBLE);
      FrameLayout menuFrame = (FrameLayout) findViewById(R.id.fragmentcontainerleft);
      menuFrame.setVisibility(View.VISIBLE);
    }
    // For convienence get the list of images early on... Slow connection propogation
    // new GetImageUrlTask().execute();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    initial = new DateTime(getIntent().getLongExtra(EXTRA_TIMESTAMP, currentTimeMillis()));

    if (savedInstanceState != null) {
      dateSelected = savedInstanceState.getBoolean(EXTRA_DATE_SELECTED, false);
      if (dateSelected) {
        return;
      }
    }

    FragmentManager supportFragmentManager = getSupportFragmentManager();
    MyDatePickerDialog datePickerDialog =
        (MyDatePickerDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_DATE_PICKER);
    if (datePickerDialog == null) {
      datePickerDialog = new MyDatePickerDialog();
      datePickerDialog.initialize(
          null, initial.getYear(), initial.getMonthOfYear() - 1, initial.getDayOfMonth(), false);
      datePickerDialog.show(supportFragmentManager, FRAG_TAG_DATE_PICKER);
    }
    datePickerDialog.setOnCancelListener(this);
    datePickerDialog.setOnDateSetListener(this);
  }
Exemplo n.º 10
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // fragments集合加数据
    fragments = new ArrayList<Fragment>();
    for (int i = 0; i < 5; i++) {
      // 新建一个带type的fragment对象
      Fragment fragment = MyFragment.getInstance(ContentType.values()[i]);

      fragments.add(fragment);
    }

    mPager = (ViewPager) findViewById(R.id.viewpager_home);
    MyAdapter pagerAdapter = new MyAdapter(getSupportFragmentManager(), fragments);
    mPager.setAdapter(pagerAdapter);

    mPager.setOnPageChangeListener(this);

    // fragment_top = new TopFregment();
    // fragment_cyclopedia = new CyclopediaFregment();
    // fragment_consult = new ConsultFregment();
    // fragment_manage = new ManageFregment();
    // fragment_data = new DataFregment();

    // 创建ActionbarTab 设置监听事件
    intiActionTab();
  }
Exemplo n.º 11
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    FragmentManager fragmentManager = getSupportFragmentManager();

    /*
     * This is called when orientation is changed.
     */
    if (savedInstanceState != null) {
      if (savedInstanceState.containsKey("content")) {
        String content = savedInstanceState.getString("content");
        if (content.equals(FavoriteListFragment.ARG_ITEM_ID)) {
          if (fragmentManager.findFragmentByTag(FavoriteListFragment.ARG_ITEM_ID) != null) {
            setFragmentTitle(R.string.favorites);
            contentFragment = fragmentManager.findFragmentByTag(FavoriteListFragment.ARG_ITEM_ID);
          }
        }
      }
      if (fragmentManager.findFragmentByTag(ProductListFragment.ARG_ITEM_ID) != null) {
        pdtListFragment =
            (ProductListFragment)
                fragmentManager.findFragmentByTag(ProductListFragment.ARG_ITEM_ID);
        contentFragment = pdtListFragment;
      }
    } else {
      pdtListFragment = new ProductListFragment();
      setFragmentTitle(R.string.app_name);
      switchContent(pdtListFragment, ProductListFragment.ARG_ITEM_ID);
    }
  }
Exemplo n.º 12
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // UI widgets
    _textViewLatLng = (TextView) findViewById(R.id.lat_lng);
    _textViewAddress = (TextView) findViewById(R.id.address);
    _textViewConnectionState = (TextView) findViewById(R.id.text_connection_state);
    _textViewConnectionStatus = (TextView) findViewById(R.id.text_connection_status);
    _activityIndicatior = (ProgressBar) findViewById(R.id.address_progress);

    _locationRequest = LocationRequest.create();

    _locationRequest.setInterval(LocationUtils.UPDATE_INTERVAL_IN_MILLISECONDS);

    _locationRequest.setFastestInterval(LocationUtils.FAST_INTERVAL_CEILING_IN_MILLISECONDS);

    _updatesRequested = false;

    _prefs = getSharedPreferences(LocationUtils.SHARED_PREFERENCES, Context.MODE_PRIVATE);

    _editor = _prefs.edit();

    _locationClient = new LocationClient(this, this, this);
  }
Exemplo n.º 13
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    app = (SAFApp) this.getApplication();
    TAG = SAFUtils.makeLogTag(this.getClass());
    addActivityToManager(this);
  }
Exemplo n.º 14
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_screen_slide);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    manga = (Manga) getIntent().getSerializableExtra(Aplication.MANGA);
    capitulo = (Capitulo) getIntent().getSerializableExtra(Aplication.CAPTIULO);

    progressBarLoad = (ProgressBar) findViewById(R.id.progressBar_loading);
    textViewPageInfo = (TextView) findViewById(R.id.textView_pageInfo);
    progressBarLoad.getIndeterminateDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);

    textViewPageInfo.setText("Aguarde...");

    try {
      if (manga.getId() == 0) {
        Manga m = new MangaDao().getForUrl(manga.getUrl());
        if (m != null) {
          manga.setId(m.getId());
        }
      }
    } catch (SQLException e) {
      e.printStackTrace();
    }

    searchPages = new SearchPages(this);
    searchPages.execute();
  }
Exemplo n.º 15
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   LogCat.i("--->", "onCreate");
   setContentView(R.layout.activity_main);
   initialize();
 }
Exemplo n.º 16
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "setting selected id from intent");
    setSelectedItemIDFromIntent();
    ActiveUser activeUser = ((GiveOrTakeApplication) getApplication()).getActiveUser();
    if (activeUser == null || activeUser.getUserID() == null) {
      Intent logoutIntent = new Intent(this, LoginActivity.class);
      logoutIntent.putExtra(LoginFragment.EXTRA_LOGIN_ACTION, LoginFragment.LOGOUT);
      logoutIntent.putExtra(MainActivity.EXTRA_ITEM_ID, getSelectedItemID());
      startActivity(logoutIntent);
      finish();
    }

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // Set up the action bar.
    final ActionBar actionBar = getActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    // Create the adapter that will return a fragment for each of the three
    // primary sections of the app.
    mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager = (ViewPager) findViewById(R.id.pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);

    // When swiping between different sections, select the corresponding
    // tab. We can also use ActionBar.Tab#select() to do this if we have
    // a reference to the Tab.
    mViewPager.setOnPageChangeListener(
        new ViewPager.SimpleOnPageChangeListener() {
          @Override
          public void onPageSelected(int position) {
            actionBar.setSelectedNavigationItem(position);
          }
        });

    // For each of the sections in the app, add a tab to the action bar.
    for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
      // Create a tab with text corresponding to the page title defined by
      // the adapter. Also specify this Activity object, which implements
      // the TabListener interface, as the callback (listener) for when
      // this tab is selected.
      actionBar.addTab(
          actionBar
              .newTab()
              .setText(mSectionsPagerAdapter.getPageTitle(i))
              .setIcon(mSectionsPagerAdapter.getPageIcon(i))
              .setTabListener(this));
    }

    actionBar.selectTab(actionBar.getTabAt(DEFAULT_SELECTED_TAB));

    Long itemID = getSelectedItemID();
    if (itemID != null) {
      actionBar.selectTab(actionBar.getTabAt(FREE_ITEMS_TAB));
    }
  }
Exemplo n.º 17
0
  /** Called when activity is created. */
  @SuppressLint("InlinedApi")
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    LanguageUtils.setLanguageConfiguration(getResources());
    super.onCreate(savedInstanceState);

    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().requestFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.help_view);
    mViewPager = (ViewPager) findViewById(R.id.view_pager);
    FragmentPagerAdapter pageAdapter = getPageAdapter();
    mViewPager.setAdapter(pageAdapter);

    mIndicator = (UnderlinePageIndicator) findViewById(R.id.underline_indicator);
    mIndicator.setViewPager(mViewPager);
    mIndicator.setFades(false);

    mCloseButton = (ImageButton) findViewById(R.id.closeButton);
    mCloseButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });
  }
Exemplo n.º 18
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.default_layout);

    ViewPager pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));

    final ScrollableTabView tabs = (ScrollableTabView) findViewById(R.id.scrollTabs);
    tabs.setViewPager(pager);
    tabs.setTabAdapter(new CustomTabAdapter(R.layout.my_tab_custom_text));

    findViewById(R.id.button_divider_color)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                Random random = new Random();
                int dividerColor =
                    Color.rgb(random.nextInt(255), random.nextInt(255), random.nextInt(255));
                tabs.setDividerColor(dividerColor);
              }
            });

    findViewById(R.id.button_divider_visibility)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                tabs.setShowDivider(!tabs.isShowingSeparator());
              }
            });
  }
Exemplo n.º 19
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    this.tracingAppTextView = (TextView) this.findViewById(R.id.tracingAppTextView);

    this.appListView = (ListView) this.findViewById(R.id.appListView);
    appInfos = new ArrayList<AppInfo>();
    refreshAppInfos();
    appListAdapter = new ArrayAdapter<AppInfo>(this, android.R.layout.simple_list_item_1, appInfos);
    appListView.setAdapter(appListAdapter);

    appListView.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            AppInfo tracingAppInfo = appInfos.get((int) arg3);
            if (traceService != null) {
              traceService.setTracingApp(tracingAppInfo);
            }
            tracingAppTextView.setText("Tracing: " + tracingAppInfo.getProcessName());
          }
        });

    this.serviceToggleButton = (ToggleButton) this.findViewById(R.id.serviceToggleButton);

    this.bindService(new Intent("TraceService"), this.serviceConnection, BIND_AUTO_CREATE);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_underline_page_indicator);
    ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
    viewPager.setAdapter(
        new FragmentStatePagerAdapter(getSupportFragmentManager()) {
          @Override
          public int getCount() {
            return 5;
          }

          @Override
          public Fragment getItem(int position) {
            Fragment f = new SampleFragment();
            Bundle args = new Bundle();
            args.putInt(SampleFragment.PAGE_NUMBER, position + 1);
            f.setArguments(args);
            return f;
          }

          @Override
          public CharSequence getPageTitle(int position) {
            return "Page" + (position + 1);
          }
        });
    PageIndicator titleIndicator = (PageIndicator) findViewById(R.id.indicator);
    titleIndicator.setViewPager(viewPager);
  }
Exemplo n.º 21
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_note_item);

    Intent intent = this.getIntent();
    // 取得方法1
    int nodeIndex = intent.getIntExtra("node", 0);
    final TextView txt = (TextView) findViewById(R.id.txtnodeindex);
    txt.setText("node-" + nodeIndex);

    Button btn = (Button) findViewById(R.id.btnrefresh);
    btn.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            txt.setText("onclick");
          }
        });

    //        TextView txtnode = (TextView)findViewById(R.id.textView20);
    //        txtnode.setText("node-"+nodeIndex);
    initTextView();

    initDao();
    initData(nodeIndex);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_item_edit);

    // retrieve selected item from the database
    // set values of the UI to that of the retrieved item

    selectedItem = MainActivity.database.getItem(MainActivity.SECONDARY_POSITION);
    nameEditText = (EditText) findViewById(R.id.nameEditText);
    priceEditText = (EditText) findViewById(R.id.priceEditText);
    paidEditText = (EditText) findViewById(R.id.paidEditText);
    remainingTextView = (TextView) findViewById(R.id.RemainingTextView);
    dateTextViewButton = (Button) findViewById(R.id.dateTextViewButton);
    doneCheckBox = (CheckBox) findViewById(R.id.doneCheckBox);

    nameEditText.setText("" + selectedItem.get_name());
    priceEditText.setText("" + selectedItem.get_price());
    paidEditText.setText("" + selectedItem.get_paid());
    remainingTextView.setText("" + selectedItem.get_remaining());
    doneCheckBox.setChecked((selectedItem.get_remaining() == 0) ? true : false);

    Formatter formatter = new Formatter();
    dateTextViewButton.setText(
        formatter
            .format("\t %tF \t(Click To Edit)", selectedItem.get_deadline_calendar())
            .toString());
    formatter.close();

    datePicker = new DatePickerFragment();
  }
Exemplo n.º 23
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GdxTests.tests.add(MatrixTest.class);

    LinearLayout layout = new LinearLayout(this);
    layout.setOrientation(LinearLayout.HORIZONTAL);

    list = new FrameLayout(this);
    list.setId(1);
    list.setLayoutParams(
        new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    layout.addView(list);

    list.setLayoutParams(new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1));

    view = new FrameLayout(this);
    view.setId(2);
    view.setLayoutParams(new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 2));
    layout.addView(view);

    setContentView(layout);

    if (savedInstanceState == null) {
      getSupportFragmentManager().beginTransaction().add(1, new TestListFragment()).commit();
    }
  }
Exemplo n.º 24
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.chooser);

    mFragmentManager = getSupportFragmentManager();
    mFragmentManager.addOnBackStackChangedListener(this);

    mChooserType = getIntent().getIntExtra(CHOOSER_TYPE, FILE_CHOOSER);
    mShowFiles = getIntent().getBooleanExtra(SHOW_FILES, true);

    if (savedInstanceState == null) {
      mPath = EXTERNAL_BASE_PATH;
      addFragment(mPath);
    } else {
      mPath = savedInstanceState.getString(PATH);
    }

    if (mChooserType == FileChooserActivity.FILE_CHOOSER) {
      findViewById(R.id.select_dir).setVisibility(View.GONE);
    } else {
      findViewById(R.id.select_dir).setOnClickListener(this);
    }

    setTitle(mPath);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sleepchooser_detail);

    // Show the Up button in the action bar.
    getActionBar().setDisplayHomeAsUpEnabled(true);

    // savedInstanceState is non-null when there is fragment state
    // saved from previous configurations of this activity
    // (e.g. when rotating the screen from portrait to landscape).
    // In this case, the fragment will automatically be re-added
    // to its container so we don't need to manually add it.
    // For more information, see the Fragments API guide at:
    //
    // http://developer.android.com/guide/components/fragments.html
    //
    if (savedInstanceState == null) {
      // Create the detail fragment and add it to the activity
      // using a fragment transaction.
      Bundle arguments = new Bundle();
      arguments.putString(
          sleepChooserDetailFragment.ARG_ITEM_ID,
          getIntent().getStringExtra(sleepChooserDetailFragment.ARG_ITEM_ID));
      sleepChooserDetailFragment fragment = new sleepChooserDetailFragment();
      fragment.setArguments(arguments);
      getSupportFragmentManager()
          .beginTransaction()
          .add(R.id.sleepchooser_detail_container, fragment)
          .commit();
    }
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_viewpagerdemo);
   viewPager = (ViewPager) findViewById(R.id.viewPager);
   viewPager.setAdapter(adapter);
 }
Exemplo n.º 27
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_chat_window);

    tvChatTopic = (TextView) findViewById(R.id.tvChatTopic);
    etChatWindowMessage = ((EditText) findViewById(R.id.etChatWindowMessage));
    lvMessages = (ListView) findViewById(R.id.lvChatWindowMessages);
    btnChatWindowSend = (Button) findViewById(R.id.btnChatWindowSend);
    adapterMessages = new MessageAdapter(this, new ArrayList<Message>());
    lvMessages.setAdapter(adapterMessages);

    numFriendsSelected = 0;

    pushNotifReceiver =
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context context, Intent intent) {

            updateMessagesAdapterFromDisk();
          }
        };

    configureChatWindowMessage();
  }
Exemplo n.º 28
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);

    mTabHost.setup(this, getSupportFragmentManager(), R.id.tabcontent);

    mTabHost.addTab(
        mTabHost
            .newTabSpec(getString(R.string.tab_accept))
            .setIndicator(getString(R.string.tab_accept)),
        AcceptPaymentFragment.class,
        null);
    mTabHost.addTab(
        mTabHost
            .newTabSpec(getString(R.string.tab_reverse))
            .setIndicator(getString(R.string.tab_reverse)),
        ReverseFragment.class,
        null);
    mTabHost.addTab(
        mTabHost
            .newTabSpec(getString(R.string.tab_printer))
            .setIndicator(getString(R.string.tab_printer)),
        PrinterFragment.class,
        null);
  }
 protected void onCreate(Bundle paramBundle)
 {
   kkxxkk.b041E041EОО041EО(getApplicationContext());
   xkkkxk.b041E041EООО041E(getApplicationContext());
   super.onCreate(paramBundle);
   setContentView(2130968686);
   a = ((AbsListView)findViewById(2131362386));
   b = new mr(this);
   c = ((Button)findViewById(2131362385));
   c.setOnClickListener(new View.OnClickListener()
   {
     public final void onClick(View paramAnonymousView)
     {
       abp.a(HttpMetricsActivity.this);
     }
   });
   d = ((Button)findViewById(2131362381));
   d.setOnClickListener(this);
   e = ((Button)findViewById(2131362382));
   e.setOnClickListener(this);
   f = ((Button)findViewById(2131362384));
   f.setOnClickListener(this);
   g = ((Button)findViewById(2131362383));
   g.setOnClickListener(this);
   a.setAdapter(b);
   getSupportLoaderManager().initLoader$71be8de6(900, this);
 }
Exemplo n.º 30
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_category_children);

    View backButton = findViewById(R.id.backButton);
    backButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            finish();
          }
        });

    TextView header = (TextView) findViewById(R.id.header);
    header.setText(getIntent().getExtras().getString("header_text", ""));

    if (savedInstanceState == null) {
      FragmentTransaction t = getSupportFragmentManager().beginTransaction();
      t.setCustomAnimations(R.anim.enter_from_bottom, R.anim.exit_from_right);
      t.replace(R.id.frame, SubCategoryFragment.createInstance(getIntent().getExtras()));
      t.commit();
      LogUtils.LOGD(TAG, "Added fragment");
    }
  }