@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);
  }
Beispiel #2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    ThemeService.applyTheme(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tag_updates_activity);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(false);

    actionBar.setDisplayShowCustomEnabled(true);
    actionBar.setCustomView(R.layout.header_title_view);
    ((TextView) actionBar.getCustomView().findViewById(R.id.title))
        .setText(R.string.TAd_contextEditTask);

    Fragment fragment;
    String tag;
    if (getIntent().getExtras().containsKey(TaskCommentsFragment.EXTRA_TASK)) {
      fragment = new TaskCommentsFragment();
      tag = "taskupdates_fragment"; // $NON-NLS-1$
    } else {
      fragment = new TagCommentsFragment();
      tag = "tagupdates_fragment"; // $NON-NLS-1$
    }

    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.add(R.id.comments_fragment_container, fragment, tag);
    transaction.commit();
  }
  @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);
  }
  // cambiar el actionbar con iconos y fondo personalizado
  @TargetApi(Build.VERSION_CODES.HONEYCOMB)
  private void changeActionBar() {
    // typeface personalizadas
    robotoBoldCondensed =
        Typeface.createFromAsset(getActivity().getAssets(), "Roboto-BoldCondensed.ttf");

    // boton de volver atras del boton home, e icono personalizado
    actionBar.setDisplayHomeAsUpEnabled(false);
    actionBar.setHomeButtonEnabled(true);
    actionBar.setIcon(R.drawable.ic_nav_menu);

    // cambiar el titulo por otro con subtitulo + layout
    actionBar.setDisplayShowTitleEnabled(false); // ocultar titulo normal
    // permitir el customizado
    actionBar.setDisplayShowCustomEnabled(true);

    // inflar un view con el layout de los titulos
    View customView = LayoutInflater.from(getActivity()).inflate(R.layout.actionbar_title, null);

    // identificar las etiquetas y setTypeface otra letra
    titulo = (TextView) customView.findViewById(R.id.tituloWeAreValencia);
    titulo.setTypeface(robotoBoldCondensed);

    /// center xml in actionbar
    ActionBar.LayoutParams lp =
        new ActionBar.LayoutParams(
            ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.MATCH_PARENT);
    lp.gravity = Gravity.CENTER;
    customView.setLayoutParams(lp);
    /* http://stackoverflow.com/questions/11327210/setting-a-custom-text-in-the-center-actionbarsherlock */

    // set inflate view to actionBarSherlock
    actionBar.setCustomView(customView);
  }
  @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);
    }
  }
 public void initActionBar() {
   mActionBar = getSupportActionBar();
   mActionBar.setDisplayHomeAsUpEnabled(true);
   mActionBar.setDisplayShowTitleEnabled(true);
   mActionBar.setTitle(stockName);
   mActionBar.setSubtitle(stockCode);
 }
  @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();
  }
 private void prepareActionBar() {
   ActionBar mActionBar = getSupportActionBar();
   mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
   mActionBar.setDisplayHomeAsUpEnabled(true);
   mActionBar.setDisplayShowHomeEnabled(false);
   mActionBar.setTitle(R.string.local);
 }
  @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);
  }
  @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
  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();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setIcon(android.R.color.transparent);
    actionBar.setLogo(R.drawable.up_icon);
    actionBar.setTitle(R.string.observation_photos);

    mApp = (INaturalistApp) getApplicationContext();
    setContentView(R.layout.observation_photos);

    Intent intent = getIntent();

    try {
      if (savedInstanceState == null) {
        String observationString = intent.getStringExtra("observation");
        if (observationString != null) mObservation = new JSONObject(observationString);
      } else {
        mObservation = new JSONObject(savedInstanceState.getString("observation"));
      }
    } catch (JSONException e) {
      e.printStackTrace();
    }

    mViewPager = (HackyViewPager) findViewById(R.id.id_pic_view_pager);
    if (mObservation != null) {
      mViewPager.setAdapter(new IdPicsPagerAdapter(mObservation));
    }
  }
  @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);
    }
  }
  @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);
          }
        });
  }
  @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();
            }
          }
        });
  }
Beispiel #16
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();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getIntent().hasExtra("template_story")) {
      templateStory = true;
    }

    if (getIntent().hasExtra("template_path")) {
      templateJsonPath = getIntent().getStringExtra("template_path");
    }

    if (getIntent().hasExtra("story_mode")) {
      storyMode = getIntent().getIntExtra("story_mode", Project.STORY_TYPE_VIDEO);
    }

    mContext = getBaseContext();

    setContentView(R.layout.activity_scene_editor_no_swipe);

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

    // For each of the sections in the app, add a tab to the action bar.
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_add_clips).setTabListener(this));
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_order).setTabListener(this));
    actionBar.addTab(actionBar.newTab().setText(R.string.tab_publish).setTabListener(this));

    showHelp();
  }
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {

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

    super.onCreateOptionsMenu(menu, inflater);
  }
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   final ActionBar actionBar = getSherlockActivity().getSupportActionBar();
   actionBar.setDisplayHomeAsUpEnabled(true);
   actionBar.setTitle("Session 4");
   actionBar.setSubtitle("nested fragment");
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setTitle(PrefsLogic.getTitleResourceForType(getPreferenceType()));
   ActionBar ab = getSupportActionBar();
   if (ab != null) {
     ab.setDisplayHomeAsUpEnabled(true);
   }
 }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.peer_monitor_content);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
  }
 private void setupActionBar() {
   ActionBar ab = getSupportActionBar();
   ab.setDisplayHomeAsUpEnabled(true);
   ab.setDisplayShowCustomEnabled(true);
   ab.setDisplayShowHomeEnabled(true);
   ab.setDisplayShowTitleEnabled(true);
   View v = getLayoutInflater().inflate(R.layout.actionbar_change_pwd, null);
   ab.setCustomView(v);
   btnConfirm = (ToggleButton) v.findViewById(R.id.btn_on_confirm);
   btnConfirm.setOnCheckedChangeListener(this);
 }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.send_coins_content);

    getWalletApplication().startBlockchainService(false);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
  }
Beispiel #24
0
  @Override
  protected void onCreate(Bundle arg0) {
    // TODO Auto-generated method stub
    super.onCreate(arg0);
    setContentView(R.layout.route);

    mHandler = new RouteHandler(this);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(getString(R.string.route));
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.show_info);

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(getString(R.string.context_showinfo));
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(true);

    fillData();
  }
Beispiel #26
0
 // Cuando se crea la actividad.
 @Override
 public void onCreate(Bundle savedInstanceState) {
   // Se llama al constructor del padre.
   super.onCreate(savedInstanceState);
   // Se establece el layout que mostrará la actividad.
   setContentView(R.layout.activity_main);
   // Se muestra el icono de navegación junto al icono de la aplicación.
   actionBar = getSupportActionBar();
   actionBar.setDisplayHomeAsUpEnabled(true);
   // Se activa el ítem de overflow en dispositivos con botón físico de
   // menú.
   activarOverflow();
 }
 private void initActionBar() {
   actionBar = getSupportActionBar();
   // actionBar.setIcon(R.drawable.ic_actionbar);// R.drawable.ic_actionbar
   actionBar.setDisplayHomeAsUpEnabled(true);
   actionBar.setDisplayShowHomeEnabled(true);
   actionBar.setHomeButtonEnabled(true);
   actionBar.setDisplayShowTitleEnabled(false);
   actionBar.setDisplayShowCustomEnabled(true);
   View view = View.inflate(this, R.layout.actionbar_title, null);
   mActionBarTitle = (ShimmerTextView) view.findViewById(R.id.tv_shimmer);
   new Shimmer().start(mActionBarTitle);
   actionBar.setCustomView(view);
 }
  @Override
  protected void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    ActionBar actionBar = this.getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    actionBar.setDisplayHomeAsUpEnabled(true);

    setContentView(R.layout.contact_selection_activity);

    setupContactsTab();
    setupGroupsTab();
    setupRecentTab();
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final ActionBar ab = getSupportActionBar();
    ab.setDisplayHomeAsUpEnabled(true);
    setContentView(R.layout.about);

    setTitle(
        getString(R.string.app_name)
            + " v"
            + AndroidHelper.getAppVersionName(getApplicationContext()));
    linkify((TextView) findViewById(R.id.aboutAuthor));
    linkify((TextView) findViewById(R.id.aboutContact));
  }
Beispiel #30
0
  // Called on when activity is first started
  @Override
  public void onCreate(Bundle b) {
    super.onCreate(b);
    // Setup the Progress Spinner in the AB
    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

    // Setup the Action Bar
    ActionBar ab = getSupportActionBar();
    ab.setTitle(R.string.ab_title_view_car);
    ab.setDisplayHomeAsUpEnabled(true);

    // Set the view. The fragment is loaded in XML and takes care of starting the loader
    setContentView(R.layout.car_list_layout);
  }