項(xiàng)目需求討論 — 待機(jī)界面

一天,產(chǎn)品經(jīng)理走過來搭了下我的肩膀。</br>
產(chǎn)品經(jīng)理:我要我們的APP有一個(gè)酷炫的待機(jī)界面。</br>
我:可以啊,你要怎么樣的界面?</br>
產(chǎn)品經(jīng)理:我也不知道啊,要么像手機(jī)店里面那種展覽的手機(jī)知道不,不是經(jīng)常有個(gè)待機(jī)界面,那種顏色不停變化的那種,我們也搞個(gè)這種,然后就五彩斑斕的黑色,記住哦。弄好給我看看效果</br>
我:產(chǎn)品經(jīng)理666,mmp,產(chǎn)品經(jīng)理一個(gè)需求就夠我玩一年....

反正我不是讀書人

我走到美工那里,準(zhǔn)備甩鍋,</br>
我:產(chǎn)品經(jīng)理要五彩斑斕的黑色,反正我也不知道,別問我具體東西,你看著辦吧。</br>
美工:XXXXXXXXXXXXX。

最后美工給了我一組顏色值:

然后說她的任務(wù)完成了。也不管了。又把鍋扔給我。</br>

最后打算用我所標(biāo)識(shí)的1-2-3的順序來做。

(PS:轉(zhuǎn)成gif后變的很模糊很奇怪了.....)

根據(jù)美工給的色值,我們可以先做四個(gè)界面:


color_first.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#81FFEF"
        android:endColor="#F067B4"
        android:angle="0"/>
</shape>

color_second.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#F6D242"
        android:endColor="#FF52E5"
        android:angle="135"/>
</shape>

color_third.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#FFA8A8"
        android:endColor="#FCFF00"
        android:angle="135"/>
</shape>

color_firth.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#81FFEF"
        android:endColor="#FFA8A8"
        android:angle="135"/>
</shape>

我們四個(gè)界面都做好了。我們把它們四個(gè)放在一起:
color_list.xml:

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
    >
    <item
        android:drawable="@drawable/color_first"
        android:duration="3000" />
    <item
        android:drawable="@drawable/color_second"
        android:duration="3000" />
    <item
        android:drawable="@drawable/color_third"
        android:duration="3000" />

    <item
        android:drawable="@drawable/color_firth"
        android:duration="3000" />

</animation-list>

activity_layout.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ll_splash"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/color_list"
    android:orientation="vertical">

</LinearLayout>

Activity.java:

public class SplashActivity extends Activity {
    AnimationDrawable anim;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        
        LinearLayout container = (LinearLayout) findViewById(R.id.ll_splash);
        anim = (AnimationDrawable) container.getBackground();
        anim.setEnterFadeDuration(2000);
        anim.setExitFadeDuration(1000);
    }

    @Override
    protected void onResume() {
        super.onResume();
        if (anim != null && !anim.isRunning())
            anim.start();
    }
    
    @Override
    protected void onPause() {
        super.onPause();
        if (anim != null && anim.isRunning())
            anim.stop();
    }
}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,048評(píng)論 25 709
  • 我估計(jì)百分之90的人做具體項(xiàng)目的時(shí)候,都會(huì)有A(登錄界面) —> B(主界面) —> A(退出登錄)。我想說明的是...
    青蛙要fly閱讀 2,723評(píng)論 11 27
  • 做一個(gè)平靜的low逼也行。 做一個(gè)平靜的牛逼。我想牛逼,一定要牛逼。不容易平靜。 我想牛逼,沒成,low逼也行。 ...
    大橙大橙閱讀 314評(píng)論 0 0
  • 人是群居動(dòng)物,沒有人能離開群體而獨(dú)居于世。有人的地方就會(huì)熱鬧,就會(huì)有集市,有活動(dòng),就會(huì)從一個(gè)村落發(fā)展成一個(gè)城市。 ...
    爺有淑女范兒閱讀 870評(píng)論 0 2
  • 現(xiàn)在來到西方國家開啟了短暫的生活 自己曾相當(dāng)?shù)刈员?英語不好 我以前一直以來對(duì)自己的英文很有自信 感覺來到這里以后...
    Bella和book閱讀 511評(píng)論 0 0

友情鏈接更多精彩內(nèi)容