當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。