@Override
  protected void initActionBar() {
    ActionBar actionBar = getSherlockActivity().getSupportActionBar();
    ActionBar.LayoutParams params =
        new ActionBar.LayoutParams(
            LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.CENTER);
    View view =
        LayoutInflater.from(getSherlockActivity())
            .inflate(R.layout.custom_actionbar_with_image_text, null);
    titleLeft = (TextView) view.findViewById(R.id.actionbar_title_left);
    titleRight = (TextView) view.findViewById(R.id.actionbar_title_right);
    titleLL = (LinearLayout) view.findViewById(R.id.actionbar_center);
    ImageButton leftButton = (ImageButton) view.findViewById(R.id.actionbar_left);
    ImageButton rightButton = (ImageButton) view.findViewById(R.id.actionbar_right);

    titleLeft.setText(getString(string.history_trend_recent));
    titleRight.setText(getString(string.history_trend_monthly_report));
    leftButton.setImageResource(drawable.public_ic_back);
    rightButton.setImageResource(drawable.detailsoftheresultsview_ic_share);

    titleLeft.setOnClickListener(this);
    titleRight.setOnClickListener(this);
    rightButton.setOnClickListener(this);
    leftButton.setOnClickListener(this);

    switchActionBar(isRecentState);

    actionBar.setCustomView(view, params);
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    actionBar.setDisplayShowCustomEnabled(true);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // If we get created for the first time we get our data from the intent
    Bundle data = savedInstanceState != null ? savedInstanceState : getIntent().getExtras();
    session = (Session) data.getSerializable(Session.IDENTIFIER);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    ActionBar.Tab tab =
        getSupportActionBar()
            .newTab()
            .setText(R.string.info)
            .setTabListener(
                new TabListener<NodeListFragment>(this, "NodeList", NodeListFragment.class));
    actionBar.addTab(tab);

    if (session.getResult() != null) {
      tab =
          getSupportActionBar()
              .newTab()
              .setText(R.string.Result)
              .setTabListener(new TabListener<InfoFragment>(this, "Info", InfoFragment.class));
      actionBar.addTab(tab);
    }

    if (savedInstanceState != null)
      getSupportActionBar()
          .selectTab(getSupportActionBar().getTabAt(savedInstanceState.getInt("Tab", 0)));
  }
Esempio n. 3
0
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   final ActionBar actionBar = getSherlockActivity().getSupportActionBar();
   actionBar.setTitle("Nested fragment");
   actionBar.setSubtitle(String.valueOf(mTimestamp));
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    createMenuDrawer(R.layout.comments);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    setTitle(getString(R.string.tab_comments));

    Bundle extras = getIntent().getExtras();
    if (extras != null) {
      fromNotification = extras.getBoolean("fromNotification");
      if (fromNotification) {
        try {
          WordPress.currentBlog = new Blog(extras.getInt("id"));
        } catch (Exception e) {
          Toast.makeText(this, getResources().getText(R.string.blog_not_found), Toast.LENGTH_SHORT)
              .show();
          finish();
        }
      }
    }

    FragmentManager fm = getSupportFragmentManager();
    fm.addOnBackStackChangedListener(mOnBackStackChangedListener);
    commentList = (CommentsListFragment) fm.findFragmentById(R.id.commentList);

    WordPress.currentComment = null;

    attemptToSelectComment();
    if (fromNotification) commentList.refreshComments(false, false, false);
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getSupportMenuInflater().inflate(R.menu.main, menu);

    getSupportActionBar().setDisplayShowHomeEnabled(true);
    // ActionBar Layout Backgroung color changing GREEN == Ramesh Gundala
    com.actionbarsherlock.app.ActionBar actionBar = getSupportActionBar();
    actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar));
    ImageButton b = new ImageButton(getApplicationContext());
    b.setBackgroundDrawable(null);
    b.setImageDrawable(getResources().getDrawable(R.drawable.buttondone));

    b.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent intent = new Intent(getApplicationContext(), MortgageNegotiatorActivity_.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
          }
        });

    menu.findItem(R.id.btnDone).setActionView(b);
    menu.findItem(R.id.github).setVisible(false);
    menu.findItem(R.id.btnDone).setVisible(true);
    return true;
  }
 private void prepareActionBar() {
   ActionBar mActionBar = getSupportActionBar();
   mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
   mActionBar.setDisplayHomeAsUpEnabled(true);
   mActionBar.setDisplayShowHomeEnabled(false);
   mActionBar.setTitle(R.string.local);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {

    requestWindowFeature(Window.FEATURE_PROGRESS);

    super.onCreate(savedInstanceState);

    setContentView(R.layout.webview);

    ActionBar ab = getSupportActionBar();
    ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    ab.setDisplayShowTitleEnabled(true);
    ab.setDisplayHomeAsUpEnabled(true);

    mWebView = (WebView) findViewById(R.id.webView);
    mWebView.getSettings().setUserAgentString(Constants.USER_AGENT);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);

    // load URL if one was provided in the intent
    String url = getIntent().getStringExtra("url");
    if (url != null) {
      loadUrl(url);
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_add_link);

    ActionBar ab = getSupportActionBar();
    ab.setDisplayHomeAsUpEnabled(true);

    mSaveButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            String url = mUrlField.getText().toString();
            String notes = mNotesField.getText().toString();

            if (!url.equals("")) {
              ParseObject post = new ParseObject(POSTS);
              post.put(KEY_URL, url);
              post.put(KEY_NOTES, notes);
              post.saveInBackground();
              finish();
            }
          }
        });
  }
Esempio n. 9
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about_screen);

    stylefont = Typeface.createFromAsset(getAssets(), AppConstants.fontStyle);
    actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle("About");

    fontActionBar(actionBar.getTitle().toString());

    actionBar.setIcon(android.R.drawable.ic_menu_info_details);

    if (isNetworkAvailable()) {
      new GetAbout(this).execute();
    } else {
      Toast.makeText(this, "Please check your internet connection", Toast.LENGTH_SHORT).show();
    }
    about = (TextView) findViewById(R.id.about_text);
    developed = (TextView) findViewById(R.id.developed);
    developed.setTypeface(stylefont);
    about.setTypeface(stylefont);
  }
Esempio n. 10
0
  private void setupActionBar() {
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);

    View actionBarView = LayoutInflater.from(this).inflate(R.layout.photos_action_bar, null);
    actionBarView
        .findViewById(R.id.back)
        .setOnClickListener(
            new OnClickListener() {
              @Override
              public void onClick(View v) {
                onBackPressed();
              }
            });

    actionBarView
        .findViewById(R.id.done_container)
        .setOnClickListener(
            new View.OnClickListener() {

              @Override
              public void onClick(View v) {
                onSaveClicked();
              }
            });

    actionBar.setCustomView(actionBarView);
  }
Esempio n. 11
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_script);
    setVolumeControlStream(AudioManager.STREAM_MUSIC);

    currentFragmentPosition = FRAGMENT_SCRIPTS;

    if (savedInstanceState == null) {
      Bundle bundle = this.getIntent().getExtras();

      if (bundle != null) {
        currentFragmentPosition = bundle.getInt(EXTRA_FRAGMENT_POSITION, FRAGMENT_SCRIPTS);
      }
    }

    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    updateCurrentFragment(currentFragmentPosition, fragmentTransaction);
    fragmentTransaction.commit();

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);
    String currentSprite = ProjectManager.getInstance().getCurrentSprite().getName();
    actionBar.setTitle(currentSprite);

    buttonAdd = (ImageButton) findViewById(R.id.button_add);
    updateHandleAddButtonClickListener();
  }
Esempio n. 12
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    setTheme(Gh4Application.THEME);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.generic_list);

    mRepoOwner = getIntent().getExtras().getString(Constants.Repository.REPO_OWNER);
    mRepoName = getIntent().getExtras().getString(Constants.Repository.REPO_NAME);
    mFilePath = getIntent().getExtras().getString(Constants.Object.PATH);
    mRef = getIntent().getExtras().getString(Constants.Object.REF);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle("History");
    actionBar.setSubtitle(mFilePath);

    ListView listView = (ListView) findViewById(R.id.list_view);
    listView.setOnItemClickListener(this);

    mCommitAdapter = new CommitAdapter(this, new ArrayList<RepositoryCommit>());
    listView.setAdapter(mCommitAdapter);

    loadData();

    getSupportLoaderManager().initLoader(0, null, this);
    getSupportLoaderManager().getLoader(0).forceLoad();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.year_browser);
    // set the home button in actionbar
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setTitle("Courses by Year");

    ActionBar.Tab year1Tab = actionBar.newTab().setText("Year 1");
    ActionBar.Tab year2Tab = actionBar.newTab().setText("Year 2");
    ActionBar.Tab year3Tab = actionBar.newTab().setText("Year 3");
    ActionBar.Tab year4Tab = actionBar.newTab().setText("Year 4");
    ActionBar.Tab year5Tab = actionBar.newTab().setText("Year 5");

    Fragment year1Frag = new Year1Fragment();
    Fragment year2Frag = new Year2Fragment();
    Fragment year3Frag = new Year3Fragment();
    Fragment year4Frag = new Year4Fragment();
    Fragment year5Frag = new Year5Fragment();

    year1Tab.setTabListener(new YearTabsListener(year1Frag));
    year2Tab.setTabListener(new YearTabsListener(year2Frag));
    year3Tab.setTabListener(new YearTabsListener(year3Frag));
    year4Tab.setTabListener(new YearTabsListener(year4Frag));
    year5Tab.setTabListener(new YearTabsListener(year5Frag));

    actionBar.addTab(year1Tab);
    actionBar.addTab(year2Tab);
    actionBar.addTab(year3Tab);
    actionBar.addTab(year4Tab);
    actionBar.addTab(year5Tab);
  }
Esempio n. 14
0
 @Override
 public void onSaveInstanceState(Bundle outState) {
   ActionBar actionBar = getSupportActionBar();
   outState.putInt("CurrentTab", actionBar.getSelectedTab().getPosition());
   // actionBar.removeAllTabs();
   super.onSaveInstanceState(outState);
 }
 private void setupActionBar() {
   final ActionBar actionbar = getSherlockActivity().getSupportActionBar();
   actionbar.setDisplayOptions(
       ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
   actionbar.setTitle(getArguments().getString("courseName"));
   actionbar.setSubtitle(getArguments().getString("itemName"));
 }
  private ActionBar.Tab constructTab(final Fragment fragment) {
    ActionBar actionBar = this.getSupportActionBar();
    ActionBar.Tab tab = actionBar.newTab();

    tab.setTabListener(
        new TabListener() {
          @Override
          public void onTabSelected(Tab tab, FragmentTransaction ignore) {
            FragmentManager manager = ContactSelectionActivity.this.getSupportFragmentManager();
            FragmentTransaction ft = manager.beginTransaction();

            ft.add(R.id.fragment_container, fragment);
            ft.commit();
          }

          @Override
          public void onTabUnselected(Tab tab, FragmentTransaction ignore) {
            FragmentManager manager = ContactSelectionActivity.this.getSupportFragmentManager();
            FragmentTransaction ft = manager.beginTransaction();
            ft.remove(fragment);
            ft.commit();
          }

          @Override
          public void onTabReselected(Tab tab, FragmentTransaction ft) {}
        });

    return tab;
  }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.network_monitor_content);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);

    final ViewPager pager = (ViewPager) findViewById(R.id.network_monitor_pager);

    final FragmentManager fm = getSupportFragmentManager();

    if (pager != null) {
      final ViewPagerTabs pagerTabs = (ViewPagerTabs) findViewById(R.id.network_monitor_pager_tabs);
      pagerTabs.addTabLabels(
          R.string.network_monitor_peer_list_title, R.string.network_monitor_block_list_title);

      final PagerAdapter pagerAdapter = new PagerAdapter(fm);

      pager.setAdapter(pagerAdapter);
      pager.setOnPageChangeListener(pagerTabs);
      pager.setPageMargin(2);
      pager.setPageMarginDrawable(R.color.bg_less_bright);

      peerListFragment = new PeerListFragment();
      blockListFragment = new BlockListFragment();
    } else {
      peerListFragment = (PeerListFragment) fm.findFragmentById(R.id.peer_list_fragment);
      blockListFragment = (BlockListFragment) fm.findFragmentById(R.id.block_list_fragment);
    }
  }
Esempio n. 18
0
 public void initActionBar() {
   mActionBar = getSupportActionBar();
   mActionBar.setDisplayHomeAsUpEnabled(true);
   mActionBar.setDisplayShowTitleEnabled(true);
   mActionBar.setTitle(stockName);
   mActionBar.setSubtitle(stockCode);
 }
Esempio n. 19
0
  /** Called when the activity is first created. */
  private void initActionBar(String titlebarText) {

    ActionBar mActionBar = getSupportActionBar();
    mActionBar.setDisplayShowHomeEnabled(false);
    mActionBar.setDisplayShowTitleEnabled(false);
    LayoutInflater mInflater = LayoutInflater.from(this);
    View mCustomView = mInflater.inflate(R.layout.custom_titlebar, null);
    TextView mTitleTextView = (TextView) mCustomView.findViewById(R.id.titlebarText);
    mTitleTextView.setText(
        ApplicationSettings.translationSettings.GetTranslation(
            "and_lbl_registerAccount", titlebarText));

    mActionBar.setCustomView(mCustomView);
    mActionBar.setDisplayShowCustomEnabled(true);

    HideKeyboard.setupUI(
        mCustomView.findViewById(R.id.custom_action_bar), UsersInformation.this); // set
    // view
    // to
    // hide
    // keyboard
    // on
    // its
    // touch
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle myextras = getIntent().getExtras();
    contextualGDS = (GruppoDiStudio) myextras.getSerializable(Constants.GDS_SUBS);

    // questo carica la materia nel gruppo
    new GetRelatedCorsoAS(GDS_members_activity.this, contextualGDS).execute();

    setContentView(R.layout.gds_members_activity);
    // customize layout
    ActionBar actionbar = getSupportActionBar();
    actionbar.setTitle(getResources().getString(R.string.gds_show_users));
    actionbar.setLogo(R.drawable.gruppistudio_icon_white);
    actionbar.setHomeButtonEnabled(true);
    actionbar.setDisplayHomeAsUpEnabled(true);

    // retrieving graphics from activity_layout
    TextView nome_gds = (TextView) findViewById(R.id.tv_nome_gds_detail_members);
    TextView materia_gds = (TextView) findViewById(R.id.tv_materia_gds_detail_members);
    ListView participants_gds = (ListView) findViewById(R.id.lv_partecipanti_gds_members);

    nome_gds.setText(contextualGDS.getNome());
    materia_gds.setText(contextualGDS.getMateria());

    if (contextualGDS.getStudentiGruppo() != null && !contextualGDS.getStudentiGruppo().isEmpty()) {
      Students_to_listview_adapter adapter =
          new Students_to_listview_adapter(
              GDS_members_activity.this,
              R.id.lv_partecipanti_gds_members,
              ((ArrayList<Studente>) contextualGDS.getStudentiGruppo()));
      participants_gds.setAdapter(adapter);
    }
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    /** This will set the bundles saved state */
    setContentView(R.layout.download_list);
    // _adView = (AdView) findViewById(R.id.ad_view);
    _list = (ListView) findViewById(R.id.list);
    _list.setDividerHeight(0);

    //		_adView.setListener(new AdViewListener() {
    //		    public void onReceiveAd() {
    //		        Log.d("MyActivity", "Tap for Tap ad received");
    //		    }
    //
    //		    public void onFailToReceiveAd(String reason) {
    //		        Log.d("MyActivity", "Tap for Tap failed to receive ad: " + reason);
    //		    }
    //
    //		    public void onTapAd() {
    //		        Log.d("MyActivity", "Tap for Tap ad tapped");
    //		    }
    //		});
    doAddItems();

    ActionBar bar = getSupportActionBar();
    bar.setDisplayHomeAsUpEnabled(true);
    _list.setOnItemClickListener(this);
    registerForContextMenu(_list);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_mapa_establecimientos);

    ActionBar ab = getSupportActionBar();
    ab.setDisplayOptions(
        ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);

    mapa = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();

    Bundle bundle = getIntent().getExtras();
    String municipio = bundle.getString("municipio");

    nombreMunicipio = (TextView) findViewById(R.id.nombreMunicipio);
    nombreMunicipio.setText(Utilities.getCamelCase(municipio));

    String nombre = bundle.getString("nombre");

    ctx = this;

    if (nombre == null) initMapaTodos(municipio);
    else initMapaUno();
    initClickMarker();
  }
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    setContentView(R.layout.select_categories);
    setTitle(getResources().getString(R.string.select_categories));

    ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);

    lv = getListView();
    lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    lv.setItemsCanFocus(false);

    Bundle extras = getIntent().getExtras();
    if (extras != null) {
      id = extras.getInt("id");
      try {
        blog = new Blog(id);
      } catch (Exception e) {
        Toast.makeText(this, getResources().getText(R.string.blog_not_found), Toast.LENGTH_SHORT)
            .show();
        finish();
      }
      checkedCategories = extras.getLongArray("checkedCategories");
      categoriesCSV = extras.getString("categoriesCSV");
    }

    loadCategories();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.data_layout);

    d_pb_ll = (LinearLayout) findViewById(R.id.data_progressbar_ll);
    dataUsedText = (TextView) findViewById(R.id.dataUsedText);
    mProgress = (ProgressBar) findViewById(R.id.percentDataUsed);
    dell = (LinearLayout) findViewById(R.id.data_error);
    detv = (TextView) findViewById(R.id.tv_failure);
    deb = (Button) findViewById(R.id.button_send_data);
    actionbar = getSupportActionBar();
    actionbar.setTitle("Data Usage");
    actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    actionbar.setHomeButtonEnabled(true);
    actionbar.setDisplayHomeAsUpEnabled(true);

    graph = (XYPlot) findViewById(R.id.mySimpleXYPlot);
    graph.setOnTouchListener(this);
    graph.setMarkupEnabled(false);

    labels = new Long[288];
    downdata = new Float[288];
    totaldata = new Float[288];

    httpclient = ConnectionHelper.getThreadSafeClient();
    httpclient.getCookieStore().clear();
    BasicClientCookie cookie =
        new BasicClientCookie("AUTHCOOKIE", ConnectionHelper.getPNAAuthCookie(this, httpclient));
    cookie.setDomain(".pna.utexas.edu");
    httpclient.getCookieStore().addCookie(cookie);
    new fetchDataTask(httpclient).execute();
    new fetchProgressTask(httpclient).execute();
  }
Esempio n. 25
0
  /** Set Design of ActionBar */
  @Override
  protected void onStart() {
    super.onStart();
    ActionBar actionBar = this.getSupportActionBar();
    actionBar.setSubtitle(R.string.app_subtitle);

    // add WebserverFragment when enabled in preferences
    if (PreferenceHelper.getWebserverEnabled(this)) {
      FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();

      mWebserverFragment = new WebserverFragment();
      // replace container in view with fragment
      fragmentTransaction.replace(R.id.base_activity_webserver_container, mWebserverFragment);
      fragmentTransaction.commit();
    } else {
      // when disabled in preferences remove fragment if existing
      if (mWebserverFragment != null) {
        FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();

        fragmentTransaction.remove(mWebserverFragment);
        fragmentTransaction.commit();

        mWebserverFragment = null;
      }
    }
  }
Esempio n. 26
0
 public void setupActionBar() {
   final ActionBar actionBar = getSupportActionBar();
   actionBar.setHomeButtonEnabled(true);
   actionBar.setDisplayShowTitleEnabled(true);
   String currentSprite = ProjectManager.getInstance().getCurrentSprite().getName();
   actionBar.setTitle(currentSprite);
 }
Esempio n. 27
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTitle(R.string.backpack_title);
    setContentView(R.layout.activity_script);
    setVolumeControlStream(AudioManager.STREAM_MUSIC);

    currentFragmentPosition = FRAGMENT_BACKPACK_SCRIPTS;

    if (savedInstanceState == null) {
      Bundle bundle = this.getIntent().getExtras();

      if (bundle != null) {
        currentFragmentPosition = bundle.getInt(EXTRA_FRAGMENT_POSITION, FRAGMENT_BACKPACK_SCRIPTS);
        backpackItem = bundle.getBoolean(BACKPACK_ITEM);
      }
    }

    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    setCurrentFragment(currentFragmentPosition);
    fragmentTransaction.commit();
    fragmentTransaction.add(R.id.script_fragment_container, currentFragment, currentFragmentTag);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayShowTitleEnabled(true);
  }
Esempio n. 28
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    setTheme(YaximApplication.getConfig(this).getTheme());
    super.onCreate(savedInstanceState);

    mChatFontSize = Integer.valueOf(YaximApplication.getConfig(this).chatFontSize);

    requestWindowFeature(Window.FEATURE_ACTION_BAR);
    setContentView(R.layout.mainchat);

    getContentResolver()
        .registerContentObserver(RosterProvider.CONTENT_URI, true, mContactObserver);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);

    registerForContextMenu(getListView());
    setContactFromUri();
    registerXMPPService();
    setSendButton();
    setUserInput();

    String titleUserid;
    if (mUserScreenName != null) {
      titleUserid = mUserScreenName;
    } else {
      titleUserid = mWithJabberID;
    }

    setCustomTitle(titleUserid);

    setChatWindowAdapter();
  }
Esempio n. 29
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setTheme(R.style.HOSTheme);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setIcon(android.R.color.transparent);

    FadingHelper helper =
        new FadingHelper()
            .actionBarBackground(R.color.black_overlay)
            .headerLayout(R.layout.xmas_header)
            .parallax(true)
            .contentLayout(R.layout.xmas_miracles);

    setContentView(helper.createView(this));
    helper.initActionBar(this);
    setUpMapIfNeeded();

    forum = (XmasItem) findViewById(R.id.forum);
    forum.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent i = new Intent(getApplicationContext(), HiddenWiki.class);
            i.putExtra("wikiLink", "http://forum.parkfans.net/thread-1673.html");
            startActivity(i);
          }
        });
  }
Esempio n. 30
0
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.pincodelock);

    Intent intent = getIntent();
    mActivity = intent.getStringExtra(EXTRA_ACTIVITY);

    mBCancel = (Button) findViewById(R.id.cancel);
    mPinHdr = (TextView) findViewById(R.id.pinHdr);
    mPinHdrExplanation = (TextView) findViewById(R.id.pinHdrExpl);
    mText1 = (EditText) findViewById(R.id.txt1);
    mText1.requestFocus();
    getWindow().setSoftInputMode(android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
    mText2 = (EditText) findViewById(R.id.txt2);
    mText3 = (EditText) findViewById(R.id.txt3);
    mText4 = (EditText) findViewById(R.id.txt4);

    SharedPreferences appPrefs =
        PreferenceManager.getDefaultSharedPreferences(getApplicationContext());

    // Not PIN Code defined yet.
    // In a previous version settings is allow from start
    if ((appPrefs.getString("PrefPinCode1", null) == null)) {
      setChangePincodeView(true);
      mPinCodeChecked = true;
      mNewPasswordEntered = true;

    } else {

      if (appPrefs.getBoolean("set_pincode", false)) {
        // pincode activated
        if (mActivity.equals("preferences")) {
          // PIN has been activated yet
          mPinHdr.setText(R.string.pincode_configure_your_pin);
          mPinHdrExplanation.setVisibility(View.VISIBLE);
          mPinCodeChecked = true; // No need to check it
          setChangePincodeView(true);
        } else {
          // PIN active
          mBCancel.setVisibility(View.INVISIBLE);
          mBCancel.setVisibility(View.GONE);
          mPinHdr.setText(R.string.pincode_enter_pin_code);
          mPinHdrExplanation.setVisibility(View.INVISIBLE);
          setChangePincodeView(false);
        }

      } else {
        // pincode removal
        mPinHdr.setText(R.string.pincode_remove_your_pincode);
        mPinHdrExplanation.setVisibility(View.INVISIBLE);
        mPinCodeChecked = false;
        setChangePincodeView(true);
      }
    }
    setTextListeners();

    ActionBar actionBar = getSupportActionBar();
    actionBar.setIcon(DisplayUtils.getSeasonalIconId());
  }