V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Part
V2EX  ›  Android

关于 splash screen 的问题

  •  
  •   Part · Nov 21, 2014 · 12523 views
    This topic created in 4180 days ago, the information mentioned may be changed or developed.

    初学 Android,想在 APP 启动时显示一个启动界面,like this

    https://c1.staticflickr.com/5/4077/5448746586_ab8acef297.jpg

    目前碰到的难题是,这个 APP 的其他 activity 是需要 Actionbar 的,所以就造成在显示这个启动画面的时候,会出现 Actionbar (因为 Theme 是 Theme.AppCompat.Light.DarkActionBar),用了以下方法,没有达到预期效果:

    1.

    ActionBar actionBar = getSupportActionBar();
    actionBar.hide();

    2.
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    Actionbar 在 APP 启动后会闪现一下。

    所以我想问的是,目前的 APP 都是怎么做的?
    我想如果用没有 Actionbar 的 theme 的话,自己定义一个 actionbar 的样式供给其它继承 ActionBarActivity 的 activity 用是不是也可以。

    3 replies    2014-11-24 12:35:12 +08:00
    jsq2627
        2
    jsq2627  
       Nov 21, 2014   ❤️ 1
    每个activity可以单独指定theme
    yrom
        3
    yrom  
       Nov 24, 2014   ❤️ 1
    给这个activity单独指定theme就行啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2529 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 08:41 · PVG 16:41 · LAX 01:41 · JFK 04:41
    ♥ Do have faith in what you're doing.