Java Code Examples for android.app.ActionBar#setDisplayUseLogoEnabled()

The following examples show how to use android.app.ActionBar#setDisplayUseLogoEnabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MSS.java    From MainScreenShow with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 设置ActionBar的布局
 *
 * @param layoutId 布局Id
 */
public void setActionBarLayout(int layoutId) {
    ActionBar actionBar = getActionBar();
    if (null != actionBar) {
        actionBar.setDisplayShowHomeEnabled(false);
        actionBar.setDisplayShowCustomEnabled(true);
        actionBar.setDisplayShowTitleEnabled(false);
        actionBar.setDisplayHomeAsUpEnabled(false);
        actionBar.setDisplayUseLogoEnabled(false);

        LayoutInflater inflator = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View v = inflator.inflate(layoutId, null);
        ActionBar.LayoutParams layout = new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        actionBar.setCustomView(v, layout);
    }
}
 
Example 2
Source File: PostActivity.java    From kylewbanks.com-AndroidApp with The Unlicense 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.post_view);

    //Determine which post we are showing
    KWBApplication application = (KWBApplication) getApplication();
    Intent intent = getIntent();
    post = application.getPostById(intent.getLongExtra("postId", -1));

    //Customize the action bar
    ActionBar actionBar = getActionBar();
    if(actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setDisplayShowHomeEnabled(false);
        actionBar.setDisplayShowTitleEnabled(true);
        actionBar.setTitle(post.getTitle());
        actionBar.setDisplayUseLogoEnabled(false);
    }

    //Get references to needed UI components
    contentView = (WebView) findViewById(R.id.post_content);
}
 
Example 3
Source File: PictureWallChoose.java    From MainScreenShow with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_picturewallchoose);
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayUseLogoEnabled(false);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowHomeEnabled(false);
    handler = new PWCHandler();
    pd = ProgressDialog.show(PictureWallChoose.this, null, getString(R.string.action_loading), true);
    Message msg = handler.obtainMessage();
    msg.obj = "start";
    handler.sendMessageDelayed(msg, 500);
    sp_tip = getSharedPreferences("tip", 0);
    SmartBarUtils.setBackIcon(getActionBar(),
            getResources().getDrawable(R.drawable.ic_back));
}
 
Example 4
Source File: HomeNavDrawerController.java    From commcare-android with Apache License 2.0 6 votes vote down vote up
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
protected void setupNavDrawer(Bundle savedInstanceState) {
    initDrawerItemsMap();
    determineDrawerItemsToInclude();
    navDrawerList.setOnItemClickListener(getNavDrawerClickListener());
    refreshItems();

    ActionBar actionBar = activity.getActionBar();
    actionBar.setHomeButtonEnabled(true);
    actionBar.setDisplayHomeAsUpEnabled(false);
    actionBar.setDisplayUseLogoEnabled(false);
    actionBar.setIcon(R.drawable.ic_menu_bar);

    if (savedInstanceState != null &&
            savedInstanceState.getBoolean(KEY_DRAWER_WAS_OPEN)) {
        reopenDrawerWhenResumed = true;
    }
}
 
Example 5
Source File: UserInfoEditActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 6 votes vote down vote up
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.user_information_edit);
	// ��ӷ��ذ�ť��ActionBar
	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.show();
	// ��������Activity�����IJ���
	Intent intent = this.getIntent();
	Bundle bundle = intent.getExtras();
	uid = bundle.getString("uid");
	avatar_file = bundle.getString("avatar_file");
	// ͼ�ν����ʼ��
	init();
}
 
Example 6
Source File: TopicDetailFragmentActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.topic_detail);
	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.show();
	Intent intent = getIntent();
	String topic_id = intent.getStringExtra("topic_id");
	int isFocus= intent.getIntExtra("isFocus", 10);
	dm = getResources().getDisplayMetrics();
	ViewPager pager = (ViewPager) findViewById(R.id.pager);
	tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
	pager.setAdapter(new TopicDetailAdapter(getSupportFragmentManager(),topic_id,isFocus));
	tabs.setViewPager(pager);
	setTabsValue();
}
 
Example 7
Source File: UserInfoShowActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 5 votes vote down vote up
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.user_information_show);
	LinearLayout hidePart = (LinearLayout) findViewById(R.id.llHidePart);
	hidePart.setVisibility(View.GONE);
	// ��ӷ��ذ�ť��ActionBar
	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	// actionBar.setDisplayShowHomeEnabled(true);
	actionBar.show();
	// Bundle bundle = intent.getExtras();
	// ��ȡ����activity�Ĵ�������ֵ��
	Intent intent = this.getIntent();
	uid = intent.getStringExtra("uid");
	status = intent
			.getIntExtra("status", GlobalVariables.DISAVAILABLE_EDIT);
	// �ж�UID�Dz��DZ������ѵ�¼�û�������ǿ��Ա༭�����ع�ע��ť���������ر༭��ť��ʾ��ע��ť��
	ffGetUid = new FanfanSharedPreferences(this);
	if (uid.equals(ffGetUid.getUid(""))) {
		status = GlobalVariables.AVAILABLE_EDIT;
	}
	init();// ��ʼ������
	// ��ȡ����״̬����������״̬����
	if (uid != null) {
		NetworkState networkState = new NetworkState();
		if (networkState.isNetworkConnected(UserInfoShowActivity.this)) {
			getUserInfo();
		} else {
			Toast.makeText(UserInfoShowActivity.this, "�����磬�����ú����ԣ�",
					Toast.LENGTH_LONG).show();
		}

	}
}
 
Example 8
Source File: GalleryFragment.java    From CameraV with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
	super.onCreateOptionsMenu(menu, inflater);
	inflater.inflate(R.menu.activity_home_gallery, menu);

	MenuItem menuFilter = menu.findItem(R.id.menu_filter);
	Spinner spinner = (Spinner) menuFilter.getActionView();
	GalleryFilterAdapter spinnerAdapter = new GalleryFilterAdapter(spinner.getContext(), this.getResources().getTextArray(R.array.filter_options));
	spinner.setAdapter(spinnerAdapter);
	spinner.setOnItemSelectedListener(this);
	
	mMenuItemBatchOperations = menu.findItem(R.id.menu_select);
	
	miDropbox = menu.findItem(R.id.menu_remote_access_dropbox);
	DropboxSyncManager dsm = DropboxSyncManager.getInstance(a);
	if (dsm != null && dsm.isSyncing())
		miDropbox.setChecked(true);
	
	ActionBar actionBar = getActivity().getActionBar();
	actionBar.setDisplayShowTitleEnabled(true);
	actionBar.setTitle(R.string.home_gallery_title);
	actionBar.setDisplayShowHomeEnabled(true);
	actionBar.setDisplayHomeAsUpEnabled(false);
	actionBar.setHomeButtonEnabled(true);
	actionBar.setLogo(this.getResources().getDrawable(
			R.drawable.ic_action_up));
	actionBar.setDisplayUseLogoEnabled(true);
	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
}
 
Example 9
Source File: PreferencesActivity.java    From CameraV with GNU General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("deprecation")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setTitle(R.string.preferences);
		
		ActionBar actionBar = getActionBar();
		actionBar.setDisplayShowTitleEnabled(true);
		actionBar.setDisplayShowHomeEnabled(true);
		actionBar.setDisplayHomeAsUpEnabled(false);
		actionBar.setHomeButtonEnabled(true);
		actionBar.setLogo(this.getResources().getDrawable(R.drawable.ic_action_up));
		actionBar.setDisplayUseLogoEnabled(true);
		
		addPreferencesFromResource(R.xml.preferences);
		
//		lockScreenMode = (ListPreference) findPreference(Preferences.Keys.LOCK_SCREEN_MODE);
//		updateSummaryWithChoice(lockScreenMode, lockScreenMode.getValue(), getResources().getStringArray(R.array.lockScreenOptions_));

		language = (ListPreference) findPreference(Preferences.Keys.LANGUAGE);
		updateSummaryWithChoice(language, language.getValue(), getResources().getStringArray(R.array.languages_));
		
		//originalImage = (ListPreference) findPreference(Models.IUser.ASSET_ENCRYPTION);
		//updateSummaryWithChoice(originalImage, originalImage.getValue(), getResources().getStringArray(R.array.originalImageOptions_));

		panicAction = (ListPreference) findPreference(Preferences.Keys.PANIC_ACTION);
		updateSummaryWithChoice(panicAction, panicAction.getValue(), getResources().getStringArray(R.array.panicActionOptions_));
	}
 
Example 10
Source File: SettingsActivity.java    From DroidPlay with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	
	setContentView(R.layout.settings);
	
	// action bar icon as home link
	ActionBar actionBar = getActionBar();
	actionBar.setSubtitle("Settings");
	actionBar.setHomeButtonEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.setDisplayHomeAsUpEnabled(true); 
	
	// preferences
	prefs = getSharedPreferences("DroidPlay", 0);
	
	// server port
	serverPort = (EditText) findViewById(R.id.server_port);
	
	// image transition
	ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.image_transition_item, R.id.transition, AirPlayUtils.getTransitionDescriptions());
	imageTransition = (Spinner) findViewById(R.id.image_transition);
	imageTransition.setAdapter(adapter);
	
	// load settings
	loadSettings();
}
 
Example 11
Source File: TopicFragmentActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.show();
	setContentView(R.layout.topic_activity);
}
 
Example 12
Source File: AttentionUserActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.attention_listview);
	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.show();
	Intent intent = getIntent();
	String UserOrMe = intent.getStringExtra("userorme");
	uid = intent.getStringExtra("uid");
	if (UserOrMe.equals(GlobalVariables.ATTENEION_ME)) {
		url = Config.getValue("AttentionMe");
	} else {
		url = Config.getValue("AttentionUser");
	}
	attentionUserModels = new ArrayList<AttentionUserModel>();
	imageDownLoader = new ImageDownLoader(AttentionUserActivity.this);
	footerLinearLayout = (LinearLayout) LayoutInflater.from(
			AttentionUserActivity.this).inflate(R.layout.next_page_footer,
			null);
	footText = (TextView) footerLinearLayout.findViewById(R.id.footer_text);
	isFirstEnter = true;
	FanfanSharedPreferences fanfanSharedPreferences = new FanfanSharedPreferences(
			AttentionUserActivity.this);
	init();
	getInformation("1");
}
 
Example 13
Source File: SettingFirmwareActivity.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
protected void onCreate(Bundle bundle)
{
    super.onCreate(bundle);
    FragmentTransaction fragmenttransaction = getFragmentManager().beginTransaction();
    a = (SettingFirmwareFragment)Fragment.instantiate(this, cn/com/smartdevices/bracelet/ui/SettingFirmwareActivity$SettingFirmwareFragment.getName());
    fragmenttransaction.add(0x1020002, a);
    fragmenttransaction.commit();
    ActionBar actionbar = getActionBar();
    actionbar.setDisplayHomeAsUpEnabled(true);
    actionbar.setDisplayShowHomeEnabled(false);
    actionbar.setDisplayUseLogoEnabled(false);
}
 
Example 14
Source File: SettingMore.java    From MainScreenShow with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayUseLogoEnabled(false);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowHomeEnabled(false);
    getFragmentManager().beginTransaction()
            .replace(android.R.id.content, new SettingMoreFragment())
            .commit();
}
 
Example 15
Source File: FeedBack.java    From MainScreenShow with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	
	super.onCreate(savedInstanceState);
	ActionBar actionBar = getActionBar();
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.setDisplayShowHomeEnabled(false);
	setContentView(R.layout.activity_feedback);
	
	content = (EditText) findViewById(R.id.edit_fb);
	qq = (EditText) findViewById(R.id.edit_fb_qq);
	
}
 
Example 16
Source File: BaseActivity.java    From LoveTalkClient with Apache License 2.0 5 votes vote down vote up
void initActionBar(String title) {
	ActionBar actionBar = getActionBar();
	if (title != null) {
		actionBar.setTitle(title);
	}
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.setDisplayHomeAsUpEnabled(true);
}
 
Example 17
Source File: EssayCommentActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.comment_list);

	ActionBar actionBar = getActionBar();
	actionBar.setIcon(null);
	actionBar.setTitle("��������");
	actionBar.setDisplayUseLogoEnabled(false);
	actionBar.setDisplayHomeAsUpEnabled(true);
	actionBar.show();
	Intent intent = getIntent();
	id = intent.getStringExtra("artid");
	client = new AsyncHttpClient();
	myCookieStore = new PersistentCookieStore(this);
	client.setCookieStore(myCookieStore);
	comment = (EditText) findViewById(R.id.comment);
	publish = (ImageButton) findViewById(R.id.publish);
	publish.setOnClickListener(new OnClickListener() {

		@Override
		public void onClick(View arg0) {
			// TODO Auto-generated method stub
			RequestParams params = new RequestParams();
			params.put("article_id", id);
			params.put("message", comment.getText().toString());
			params.put("at_uid", atuid);
			postcom(params);
			comment.setText("");
			refresh();
		}
	});
	comitems = new ArrayList<EssayCommentModel>();
	imageDownLoader = new ImageDownLoader(this);
	comlist = (ListView) findViewById(R.id.comlist);
	isFirstEnter = true;
	comlist.setOnItemClickListener(this);
	comlist.setOnScrollListener(this);

	Getcom(id);

}
 
Example 18
Source File: MusicLibrary.java    From mobile-manager-tool with MIT License 4 votes vote down vote up
/**
 * For the theme chooser
 */
private void initActionBar() {
	ActionBar actBar = getActionBar();
	actBar.setDisplayUseLogoEnabled(true);
    actBar.setDisplayShowTitleEnabled(false);
}
 
Example 19
Source File: PXVirtualActionBarLogoAdapter.java    From pixate-freestyle-android with Apache License 2.0 4 votes vote down vote up
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
private void setLogoICS(PXStylerContext context, ActionBar actionBar) {
    actionBar.setDisplayUseLogoEnabled(true);
    actionBar.setLogo(context.getBackgroundImage());
}
 
Example 20
Source File: BarometerNetworkActivity.java    From PressureNet with GNU General Public License v3.0 4 votes vote down vote up
private void setUpActionBar() {
	ActionBar bar = getActionBar();
	bar.setDisplayUseLogoEnabled(true);
	bar.setTitle("");

}