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 7f37a1a7acc858d22a6533b92558a659b00f6286..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>
             android:layout_centerHorizontal="true"
             android:layout_margin="10dp"
             android:textSize="16sp"
+            android:textAlignment="center"
             android:textColor="?android:textColorPrimary" />
     </RelativeLayout>
 </FrameLayout>
\ No newline at end of file