1
我試圖在開關compat上應用激進的反應/紋波效應,但是我能從中得到最多的效果是短暫的。我在一排中有一個開關,一旦開關打開和關閉,我想在整個行中突出顯示。目前唯一突出的是轉換器,不會產生連鎖反應,就像轉換器本身的一個沉悶的高光。一旦開關翻轉,是否有可能在整個行中發出波紋/波紋效應? 這裏是我的代碼:switchcompat可能會產生連鎖反應嗎?
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/altercolor2"
android:padding="@dimen/common_padding">
<com.myapp.utils.FontTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:paddingTop="@dimen/common_top_padding"
android:paddingLeft="0dp"
android:paddingBottom="@dimen/common_bottom_padding"
android:textSize="@dimen/title"
foo:customFont="proxima-nova-regular.ttf"
android:text="@string/display_image" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/display_image_toggle_control"
foo:theme="@style/MyMaterialTheme.Switch"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginLeft="@dimen/toggle_margin_leftright"
android:layout_marginRight="2dp" />
</FrameLayout>
上述framelayout包含在,我在前景和背景中添加什麼,還有我在哪裏添加focusable在交換機中還是在包含它的framelayout中? –
添加焦點和可點擊的根源。 – Amir
我該如何增加漣漪效應的直徑,目前它似乎在半途而廢? –