当前位置: 首页>>代码示例>>Java>>正文


Java ActionBar.hide方法代码示例

本文整理汇总了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());
}
 
开发者ID:yuqirong,项目名称:FlexibleSearchBar,代码行数:23,代码来源:MainActivity.java

示例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);
}
 
开发者ID:l465659833,项目名称:Bigbang,代码行数:21,代码来源:CopyActivity.java

示例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();
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:18,代码来源:PayOrderActivity.java

示例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();

}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:22,代码来源:CityPickerActivity.java

示例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;
}
 
开发者ID:tcking,项目名称:GiraffePlayer2,代码行数:22,代码来源:UIHelper.java

示例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);

}
 
开发者ID:fekracomputers,项目名称:IslamicLibraryAndroid,代码行数:25,代码来源:ReadingActivity.java

示例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();
    }
}
 
开发者ID:StringflowServer,项目名称:Beach-Android,代码行数:34,代码来源:PollActivity.java

示例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);
    }
}
 
开发者ID:Wilshion,项目名称:HeadlineNews,代码行数:14,代码来源:JCVideoPlayer.java

示例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);
}
 
开发者ID:khizar1556,项目名称:MKVideoPlayer,代码行数:14,代码来源:MKPlayer.java

示例10: setSupportActionBar

import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
public void setSupportActionBar(@Nullable ActionBar actionBar) {
    mActionBar = actionBar;
    if (isShowing()) {
        actionBar.show();
    } else {
        actionBar.hide();
    }
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:9,代码来源:AndroidMediaController.java

示例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);
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:14,代码来源:RegisterActivity.java

示例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();
    }
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:12,代码来源:StyleActivity.java

示例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();
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:15,代码来源:EditGenderActivity.java

示例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);
}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:14,代码来源:LaunchActivity.java

示例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);
}
 
开发者ID:HitRoxxx,项目名称:FloatingNew,代码行数:14,代码来源:SplashScreen.java


注:本文中的android.support.v7.app.ActionBar.hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。