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


Java ActionBar.hide方法代码示例

本文整理汇总了Java中android.app.ActionBar.hide方法的典型用法代码示例。如果您正苦于以下问题:Java ActionBar.hide方法的具体用法?Java ActionBar.hide怎么用?Java ActionBar.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.ActionBar的用法示例。


在下文中一共展示了ActionBar.hide方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    View decorView = getWindow().getDecorView();
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    decorView.setSystemUiVisibility(uiOptions);
    ActionBar actionBar = getActionBar();
    if (null != actionBar) actionBar.hide();
    ButterKnife.bind(this);
    FirebaseAuth auth = FirebaseAuth.getInstance();
    if (auth.getCurrentUser() != null) {
        showWhiteSnackBar(R.string.sign_in_successful);
        googleLoginButton.setVisibility(View.INVISIBLE);
        Intent intent = new Intent(getApplicationContext(), MainActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
        finish();
    }

}
 
开发者ID:vixir,项目名称:Perfect-Day,代码行数:22,代码来源:LoginActivity.java

示例2: hideStatusBar

import android.app.ActionBar; //导入方法依赖的package包/类
/**
 * 隐藏状态栏
 * <p>
 * 在setContentView前调用
 */
protected void hideStatusBar() {
    final int sdkVer = Build.VERSION.SDK_INT;
    if (sdkVer < 16) {
        //4.0及一下
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    } else {
        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
    }
}
 
开发者ID:chengzichen,项目名称:KrGallery,代码行数:22,代码来源:MainActivity.java

示例3: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    View decorView = getWindow().getDecorView();
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    decorView.setSystemUiVisibility(uiOptions);
    ActionBar actionBar = getActionBar();
    if (null != actionBar) actionBar.hide();
    mBottomBar.setOnTabSelectListener(
            new OnTabSelectListener() {
                @Override
                public void onTabSelected(@IdRes int tabId) {
                    Fragment fragment;
                    switch (tabId) {
                        case R.id.bot_bar_today:
                            fragment = new TodayTasksFragment();
                            break;
                        case R.id.bot_bar_list:
                            fragment = new ListTasksFragment();
                            break;
                        case R.id.bot_bar_more:
                            fragment = new MoreInfoFragment();
                            break;
                        default:
                            fragment = new TodayTasksFragment();
                    }
                    FragmentManager fragmentManager = getSupportFragmentManager();
                    FragmentTransaction ft = fragmentManager.beginTransaction();
                    ft.replace(R.id.flContent, fragment, fragment.getClass().getName());
                    ft.commit();
                }
            });
}
 
开发者ID:vixir,项目名称:Perfect-Day,代码行数:36,代码来源:MainActivity.java

示例4: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "StandaloneDisplayActivity.onCreate()");

    super.onCreate(savedInstanceState);

    int layout = getLayout();

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setContentView(layout);
    displayLayout = (DisplayLayout) findViewById(R.id.display);
    ActionBar ab = getActionBar();
    if (ab != null) {
        ab.hide();
    }
    if (!getIntent().getBooleanExtra(EXTRA_MIRROR_DISPLAY, false)) {
        mediaRouter = (MediaRouter) getSystemService(MEDIA_ROUTER_SERVICE);
        mediaRouter
                .addCallback(MediaRouter.ROUTE_TYPE_LIVE_VIDEO, callback);
        updatePresentation();
    }
    displayLayout.go(0, false);
    View view = findViewById(R.id.display_attributes);
    DisplayInfoHelper.populate(this, view, getWindowManager().getDefaultDisplay());
    DisplayInfoHelper.show(view, DURATION);
}
 
开发者ID:StylingAndroid,项目名称:PresenterLite,代码行数:27,代码来源:StandaloneDisplayActivity.java

示例5: menuBarsHide

import android.app.ActionBar; //导入方法依赖的package包/类
private void menuBarsHide() {
    Log.d(getClass().getName(), "menuBarsHide");
    ActionBar actionBar = getActionBar();
    if (actionBar == null) {
        Log.d(getClass().getName(), "menuBarsHide ActionBar is null");
        return;
    }

    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setDisplayShowHomeEnabled(false);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().clearFlags(
            WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
    getWindow().getDecorView().setSystemUiVisibility(
            View.SYSTEM_UI_FLAG_LOW_PROFILE);
    actionBar.hide(); // slides out
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:18,代码来源:ImageViewerActivity.java

示例6: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_piclocation);
    ActionBar actionBar = getActionBar();
    if(actionBar!=null)actionBar.hide();
    initView();
    mMapView.onCreate(savedInstanceState);// 此方法必须重写
    initMap();

}
 
开发者ID:Vicent9920,项目名称:MyMap,代码行数:12,代码来源:PiclocationActivity.java

示例7: hideStatusBar

import android.app.ActionBar; //导入方法依赖的package包/类
private void hideStatusBar() {
    View decorView = getWindow().getDecorView();
    // Hide the status bar.
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
    decorView.setSystemUiVisibility(uiOptions);
    // Remember that you should never show the action bar if the
    // status bar is hidden, so hide that too if necessary.
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.hide();
    }
}
 
开发者ID:r3bl-alliance,项目名称:stay-awake-app,代码行数:13,代码来源:MainActivity.java

示例8: hide

import android.app.ActionBar; //导入方法依赖的package包/类
private void hide() {
    // Hide UI first
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.hide();
    }
    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:daergoth,项目名称:dankbank,代码行数:13,代码来源:ImmerseMemeActivity.java

示例9: setSystemUiVisible

import android.app.ActionBar; //导入方法依赖的package包/类
/** Toggle whether the system UI (status bar / system bar) is visible.
 *  This also toggles the action bar visibility.
 * @param show True to show the system UI, false to hide it.
 */
void setSystemUiVisible(boolean show) {
    mSystemUiVisible = show;

    Window window = getActivity().getWindow();
    WindowManager.LayoutParams winParams = window.getAttributes();
    View view = getView();
    ActionBar actionBar = getActivity().getActionBar();

    if (show) {
        // Show status bar (remove fullscreen flag)
        window.setFlags(0, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        // Show system bar
        view.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);
        // Show action bar
        actionBar.show();
    } else {
        // Add fullscreen flag (hide status bar)
        window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
        // Hide system bar
        view.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
        // Hide action bar
        actionBar.hide();
    }
    window.setAttributes(winParams);
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:31,代码来源:ContentFragment.java

示例10: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ActionBar b = getActionBar();
    if (b!=null) b.hide();

    display = (TextView) findViewById(R.id.display);
    switchPhone = (Switch) findViewById(R.id.switchPhone);

    hellos = getResources().getStringArray(R.array.hello);
    byes = getResources().getStringArray(R.array.bye);
    convos = getResources().getStringArray(R.array.convo);

    mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);

    mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);


    findViewById(R.id.about_link).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent about = new Intent(MainActivity.this, AboutActivity.class);
            startActivity(about);
        }
    });


}
 
开发者ID:quaap,项目名称:PhoneFoneFun,代码行数:31,代码来源:MainActivity.java

示例11: onSystemUiHidden

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onSystemUiHidden() {
    if (mLevel == SystemUiHelper.LEVEL_LOW_PROFILE) {
        // Manually hide the action bar when in low profile mode.
        ActionBar ab = mActivity.getActionBar();
        if (ab != null) {
            ab.hide();
        }
    }

    setIsShowing(true);
}
 
开发者ID:ujjwalagrawal17,项目名称:CodeCompilerApp,代码行数:13,代码来源:SystemUiHelperImplJB.java

示例12: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_security_setting);
    StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.brands_color));
    //隐藏actionBar
    ActionBar actionBar = getActionBar();
    if(actionBar != null){
        actionBar.hide();
    }
    //绑定ButterKnife
    ButterKnife.bind(this);
    initTitleBar();
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:15,代码来源:SecuritySettingActivity.java

示例13: onCreate

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_setting);
    StatusBarCompat.setStatusBarColor(this,getResources().getColor(R.color.brands_color));
    //隐藏actionBar
    ActionBar actionBar = getActionBar();
    if(actionBar != null){
        actionBar.hide();
    }
    //绑定ButterKnife
    ButterKnife.bind(this);
    initTitleBar();
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:15,代码来源:SettingActivity.java

示例14: onSystemUiHidden

import android.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onSystemUiHidden() {
    if (mLevel == SystemUiHelper.LEVEL_LOW_PROFILE) {
        // Manually hide the action bar when in low profile mode.
        ActionBar ab = mActivity.getActionBar();
        if (ab != null) {
            ab.hide();
        }
    }

    setIsShowing(false);
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:13,代码来源:SystemUiHelperImplJB.java

示例15: onSystemUiHidden

import android.app.ActionBar; //导入方法依赖的package包/类
protected void onSystemUiHidden() {
    ActionBar ab = mActivity.getActionBar();
    if (ab != null) {
        ab.hide();
    }

    mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setIsShowing(false);
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:11,代码来源:SystemUiHelperImplHC.java


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