1
でGardientアニメーションは、これはスタート画面です:タブがアクティブに、そしてタブが去ったときの輝きを減少しているとき アンドロイド:私のアプリの起動時にタブレイアウト
は私が増加輝きをしたいです。これは私のセレクタファイルです:アプリが起動しアクティブにタブが輝きを持っていないとき
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true" android:visible="true" >
<item
android:drawable="@drawable/phase1"
android:duration="20" />
<item
android:drawable="@drawable/phase2"
android:duration="20" />
<item
android:drawable="@drawable/phase3"
android:duration="20" />
<item
android:drawable="@drawable/phase4"
android:duration="20" />
<item
android:drawable="@drawable/phase5"
android:duration="20" />
<item
android:drawable="@drawable/phase6"
android:duration="20" />
<item
android:drawable="@drawable/phase7"
android:duration="20" />
<item
android:drawable="@drawable/phase8"
android:duration="20" />
<item
android:drawable="@drawable/phase9"
android:duration="20" />
<item
android:drawable="@drawable/phase10"
android:duration="20" />
<item
android:drawable="@drawable/phase11"
android:duration="20" />
<item
android:drawable="@drawable/phase12"
android:duration="20" />
問題で、この私のアニメーションファイルですが
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:state_focused="false"
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/reverse_animation" />
<item android:state_focused="false"
android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/animation" />
<!-- Focused states -->
<item android:state_focused="true"
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/animation" />
<item android:state_focused="true"
android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/animation" />
<!-- Pressed -->
<item android:state_pressed="true"
android:drawable="@drawable/pressed" />
他の2つのタブには輝きがあります。
私は各フェーズファイルでグラデーションを使用し、それぞれに半径を増やしました。 は、私はこれは、フェーズ1で
をPHASE1するphase12で始まるreverse_animationファイルで:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:type="radial"
android:gradientRadius="1"
android:startColor="#DD02e4ff"
android:centerY="-0.16" />
</shape>
私はタブのデフォルト設定の助けを必要としてください。 [オーディオ]タブは、他のタブではなく、明るくなるはずです。私はセレクタファイルで非常に多くの可能な組み合わせを試しましたが、これを達成することはできません。ありがとう!