本文整理汇总了Java中android.support.v7.app.ActionBar.hide方法的典型用法代码示例。如果您正苦于以下问题:Java ActionBar.hide方法的具体用法?Java ActionBar.hide怎么用?Java ActionBar.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.app.ActionBar
的用法示例。
在下文中一共展示了ActionBar.hide方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void initView() {
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.hide();
}
searchbarview = (SearchBarView) findViewById(R.id.searchbarview);
searchbarview.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// enter search activity
Toast.makeText(MainActivity.this, "enter search activity", Toast.LENGTH_SHORT).show();
}
});
AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.appbarlayout);
appBarLayout.addOnOffsetChangedListener(this);
toolbar = (Toolbar) findViewById(R.id.toolbar);
RecyclerView mRecyclerView = (RecyclerView) findViewById(R.id.recyclerview);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setVerticalScrollBarEnabled(true);
mRecyclerView.setNestedScrollingEnabled(false);
mRecyclerView.setAdapter(new MyAdapter());
}
示例2: fullScreenMode
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void fullScreenMode(boolean fullScreen) {
ActionBar actionBar = getSupportActionBar();
isFullScreen = fullScreen;
if(fullScreen) {
if(actionBar != null) {
actionBar.hide();
}
adjustActionBarWrap();
} else {
if(actionBar != null) {
actionBar.show();
}
copyFab.hide();
exitFab.hide();
exitFullScreenFab.hide();
}
SPHelper.save(IS_FULL_SCREEN_COPY,fullScreen);
}
示例3: onCreate
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
//设置支付宝沙箱环境
EnvUtils.setEnv(EnvUtils.EnvEnum.SANDBOX);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_payorder);
StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.white));
//隐藏actionBar
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.hide();
}
//绑定ButterKnife
ButterKnife.bind(this);
initView(getIntent());
initTitleBarEvent();
}
示例4: onCreate
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//初始化百度地图SDK
SDKInitializer.initialize(getApplicationContext());
setContentView(R.layout.cp_activity_city_list);
StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.white));
//隐藏actionBar
ActionBar actionBar = getSupportActionBar();
if(actionBar != null){
actionBar.hide();
}
initData();
initView();
//声明LocationClient类
mLocationClient = new LocationClient(getApplicationContext());
//注册监听函数
mLocationClient.registerLocationListener(myListener);
initLocation();
}
示例5: showActionBar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
public UIHelper showActionBar(boolean show) {
if (activity == null) {
return this;
}
if (activity instanceof AppCompatActivity) {
ActionBar supportActionBar = ((AppCompatActivity) activity).getSupportActionBar();
if (supportActionBar != null) {
try {
supportActionBar.setShowHideAnimationEnabled(false);
} catch (Exception e) {
}
if (show) {
supportActionBar.show();
} else {
supportActionBar.hide();
}
}
}
return this;
}
示例6: hide
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void hide() {
// Hide UI first
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.hide();
}
if (mControlsView != null) {
animateFadeOutHide(mControlsView, FADE_ANIMATION_DURATION);
}
if (searchScrubBar != null) {
animateFadeOutHide(searchScrubBar, FADE_ANIMATION_DURATION);
}
if (mFloatingPageNumberFrameLayout != null) {
animateFadeOutHide(mFloatingPageNumberFrameLayout, FADE_ANIMATION_DURATION);
}
mVisible = false;
// Schedule a runnable to remove the status and navigation bar after a delay
mHideHandler.removeCallbacks(mShowPart2Runnable);
mHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
}
示例7: initViews
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void initViews(){
ivBack = (ImageView) findViewById(R.id.ivBack);
ivNext = (ImageView) findViewById(R.id.ivNext);
ivNext.setVisibility(View.INVISIBLE);
tvHeader = (TextView) findViewById(R.id.tvHeader);
tvHeader.setText(getIntent().getStringExtra("poll").toUpperCase());
scrollViewPoll = (ScrollView) findViewById(R.id.scrollViewPoll);
etPollQues = (EditText) findViewById(R.id.etPollQues);
tvResponseType = (TextView) findViewById(R.id.tvResponseType);
llResponseType = (LinearLayout) findViewById(R.id.llResponseType);
tvTextBoxMulChoice = (TextView) findViewById(R.id.tvTextBoxMulChoice);
tvTextBoxRBtn = (TextView) findViewById(R.id.tvTextBoxRBtn);
tvTextBoxNumeric = (TextView) findViewById(R.id.tvTextBoxNumeric);
tvTextBox = (TextView) findViewById(R.id.tvTextBox);
llMultipleChoice = (LinearLayout) findViewById(R.id.llMultipleChoice);
etOptionOne = (EditText) findViewById(R.id.etOptionOne);
etOptionTwo = (EditText) findViewById(R.id.etOptionTwo);
etOptionThree = (EditText) findViewById(R.id.etOptionThree);
etOptionFour = (EditText) findViewById(R.id.etOptionFour);
btnViewSaved = (Button) findViewById(R.id.btnViewSaved);
btnAddMoreChoice = (Button) findViewById(R.id.btnAddMoreChoice);
rlPollExpiry = (RelativeLayout) findViewById(R.id.rlPollExpiry);
btnPollExpiryTime = (Button) findViewById(R.id.btnPollExpiryTime);
btnSend = (Button) findViewById(R.id.btnSend);
btnSave = (Button) findViewById(R.id.btnSave);
tvRecipientMsg = (TextView) findViewById(R.id.tvRecipientMsg);
opt = 0;
isFragmentOpen = false;
ActionBar actionBar = getSupportActionBar();
if(actionBar!=null){
actionBar.hide();
}
}
示例8: hideSupportActionBar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
public static void hideSupportActionBar(Context context) {
if (ACTION_BAR_EXIST) {
ActionBar ab = JCUtils.getAppCompActivity(context).getSupportActionBar();
if (ab != null) {
ab.setShowHideAnimationEnabled(false);
ab.hide();
}
}
if (TOOL_BAR_EXIST) {
JCUtils.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
示例9: tryFullScreen
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void tryFullScreen(boolean fullScreen) {
if (activity instanceof AppCompatActivity) {
ActionBar supportActionBar = ((AppCompatActivity) activity).getSupportActionBar();
if (supportActionBar != null) {
if (fullScreen) {
supportActionBar.hide();
} else {
supportActionBar.show();
}
}
}
setFullScreen(fullScreen);
}
示例10: setSupportActionBar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
public void setSupportActionBar(@Nullable ActionBar actionBar) {
mActionBar = actionBar;
if (isShowing()) {
actionBar.show();
} else {
actionBar.hide();
}
}
示例11: onCreate
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.white));
//隐藏actionBar
ActionBar actionBar = getSupportActionBar();
if(actionBar != null){
actionBar.hide();
}
//绑定ButterKnife
ButterKnife.bind(this);
}
示例12: loadActivityStyle
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
/**
* 基本样式
*/
protected void loadActivityStyle() {
final Window window = getWindow();
window.requestFeature(Window.FEATURE_NO_TITLE);
final ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.hide();
}
}
示例13: onCreate
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit_gender);
StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.white));
//隐藏actionBar
ActionBar actionBar = getSupportActionBar();
if(actionBar != null){
actionBar.hide();
}
//绑定ButterKnife
ButterKnife.bind(this);
initTitleBar();
}
示例14: hide
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void hide() {
// Hide UI first
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.hide();
}
mControlsView.setVisibility(View.GONE);
mVisible = false;
// Schedule a runnable to remove the status and navigation bar after a delay
mHideHandler.removeCallbacks(mShowPart2Runnable);
mHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
}
示例15: hide
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void hide() {
// Hide UI first
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.hide();
}
// Schedule a runnable to remove the status and navigation bar after a delay
mHideHandler.removeCallbacks(mShowPart2Runnable);
int UI_ANIMATION_DELAY = 200;
mHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
}