]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/main_framelayout.xml
Add a ripple touch animation to the New Tab and Close Tab buttons. https://redmine...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / main_framelayout.xml
index a381b996ddb0468b796660f4292a82571339fcde..5e330e2418fa072ab8fcf19e12a86f4949565d83 100644 (file)
                         app:layout_scrollFlags="scroll|enterAlways|snap"
                         android:visibility="gone" >
 
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
                         <ImageView
-                            android:layout_height="wrap_content"
+                            android:layout_height="match_parent"
                             android:layout_width="wrap_content"
                             android:layout_gravity="center_vertical"
                             android:paddingStart="10dp"
                             android:paddingEnd="10dp"
                             android:src="@drawable/close_light"
                             android:tint="?attr/addTabIconTintColor"
+                            android:background="?attr/selectableItemBackground"
                             android:onClick="closeTab"
                             android:contentDescription="@string/close_tab" />
 
                             app:tabIndicatorGravity="top"
                             app:tabMode="scrollable" />
 
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
                         <ImageView
-                            android:layout_height="wrap_content"
+                            android:layout_height="match_parent"
                             android:layout_width="wrap_content"
                             android:layout_gravity="center_vertical"
                             android:paddingStart="10dp"
                             android:paddingEnd="10dp"
                             android:src="@drawable/add_light"
                             android:tint="?attr/addTabIconTintColor"
+                            android:background="?attr/selectableItemBackground"
                             android:onClick="addTab"
                             android:contentDescription="@string/add_tab" />
                     </LinearLayout>