Browse Source

Moved icon in drawer, removed unnecessary view in tab_list_item

master
Anthony Restaino 9 years ago
parent
commit
f2d2c8ed5f
  1. 42
      app/src/main/res/layout/tab_drawer.xml
  2. 100
      app/src/main/res/layout/tab_list_item.xml

42
app/src/main/res/layout/tab_drawer.xml

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/drawerBackground" android:background="?attr/drawerBackground"
android:clickable="true" android:clickable="true"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -26,7 +26,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/action_new_tab" android:contentDescription="@string/action_new_tab"
android:src="@drawable/ic_action_tabs" /> android:src="@drawable/ic_action_tabs"/>
</FrameLayout> </FrameLayout>
<TextView <TextView
@ -38,7 +38,7 @@
android:maxLines="1" android:maxLines="1"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
android:text="@string/tabs" android:text="@string/tabs"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge"/>
</LinearLayout> </LinearLayout>
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
@ -48,7 +48,7 @@
android:layout_weight="1" android:layout_weight="1"
android:divider="@null" android:divider="@null"
android:dividerHeight="0dp" android:dividerHeight="0dp"
android:overScrollMode="ifContentScrolls" /> android:overScrollMode="ifContentScrolls"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -72,11 +72,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/action_back" android:contentDescription="@string/action_back"
android:src="@drawable/ic_action_back" /> android:src="@drawable/ic_action_back"/>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/new_tab_button" android:id="@+id/action_home"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -84,16 +84,16 @@
android:clickable="true"> android:clickable="true">
<ImageView <ImageView
android:id="@+id/icon_plus" android:id="@+id/icon_home"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/action_new_tab" android:contentDescription="@string/action_homepage"
android:src="@drawable/ic_action_plus" /> android:src="@drawable/ic_action_home"/>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/action_home" android:id="@+id/action_forward"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -101,16 +101,16 @@
android:clickable="true"> android:clickable="true">
<ImageView <ImageView
android:id="@+id/icon_home" android:id="@+id/icon_forward"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/action_homepage" android:contentDescription="@string/action_forward"
android:src="@drawable/ic_action_home" /> android:src="@drawable/ic_action_forward"/>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/action_forward" android:id="@+id/new_tab_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -118,12 +118,12 @@
android:clickable="true"> android:clickable="true">
<ImageView <ImageView
android:id="@+id/icon_forward" android:id="@+id/icon_plus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/action_forward" android:contentDescription="@string/action_new_tab"
android:src="@drawable/ic_action_forward" /> android:src="@drawable/ic_action_plus"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>

100
app/src/main/res/layout/tab_list_item.xml

@ -1,61 +1,53 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout android:id="@+id/tab_item_background"
android:id="@+id/tab_item_background" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="56dp"
android:clickable="true" android:background="?attr/listBackground"
android:gravity="center_vertical" android:clickable="true"
android:orientation="horizontal"> android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout <ImageView
android:layout_width="match_parent" android:id="@+id/faviconTab"
android:layout_height="match_parent" android:layout_width="24dp"
android:background="?attr/listBackground" android:layout_height="24dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:contentDescription="Favicon"
android:gravity="center_vertical"/>
<TextView
android:id="@+id/textTab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:maxLines="1"
android:weightSum="1"> android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceListItemSmall"/>
<ImageView <FrameLayout
android:id="@+id/faviconTab" android:id="@+id/deleteAction"
android:layout_width="24dp" android:layout_width="48dp"
android:layout_height="24dp" android:layout_height="48dp"
android:layout_marginLeft="16dp" android:layout_gravity="center_vertical"
android:layout_marginRight="16dp" android:layout_marginRight="4dp"
android:contentDescription="Favicon" android:background="?attr/actionBarItemBackground"
android:gravity="center_vertical" /> android:gravity="center">
<TextView <ImageView
android:id="@+id/textTab" android:id="@+id/deleteButton"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="16dp" android:layout_gravity="center"
android:layout_marginRight="16dp" android:contentDescription="Delete Tab"
android:layout_weight="1" android:src="@drawable/ic_action_delete"/>
android:ellipsize="end" </FrameLayout>
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:maxLines="1"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceListItemSmall" />
<FrameLayout
android:id="@+id/deleteAction"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="4dp"
android:background="?attr/actionBarItemBackground"
android:gravity="center">
<ImageView
android:id="@+id/deleteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="Delete Tab"
android:src="@drawable/ic_action_delete" />
</FrameLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
Loading…
Cancel
Save