Skip to content

Instantly share code, notes, and snippets.

@sbaar
Created November 21, 2016 17:45
Show Gist options
  • Save sbaar/42dd666d1b8dfb559addc628b00672c0 to your computer and use it in GitHub Desktop.
Save sbaar/42dd666d1b8dfb559addc628b00672c0 to your computer and use it in GitHub Desktop.
3pk tab customization
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@color/_mm_top_layout_bg"
app:theme="@style/KBAppTheme"
android:theme="@style/KBAppTheme"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:background="@color/_mm_top_layout_bg"
android:layout_height="wrap_content">
<include layout="@layout/kb_page"
/>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:visibility="gone"
android:id="@+id/_mm_recylcer_view"
android:layout_height="45dp"/>
<com.makemoji.keyboard.LatinKeyboardView
android:layout_width="match_parent"
android:layout_height="210dp"
android:visibility="gone"
android:keyPreviewLayout="@layout/kb_preview_layout"
android:background="@android:color/white"
android:keyBackground="@drawable/mm_key_bg"
android:keyTextColor="@color/_mm_black_87"
android:shadowRadius="0.0"
android:id="@+id/_mm_kb_latin"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/kb_bottom_nav"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:src="@drawable/mm_globe"
android:id="@+id/kb_abc"
android:padding="1dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_height="match_parent" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabIndicatorColor="@android:color/transparent"
app:tabPaddingStart="-0dp"
app:tabPaddingEnd="0dp"
app:tabMaxWidth="55dp"
/>
<ImageView
android:id="@+id/kb_backspace_button"
android:padding="4dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/mm_backspace_grey600_24dp"
android:contentDescription="@string/_mm_backspace" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@drawable/odel_tab_bg"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<com.makemoji.mojilib.MMForegroundImageView
android:layout_width="match_parent"
android:padding="2dp"
android:tag="iv"
android:layout_height="match_parent"
android:id="@android:id/icon"
android:minHeight="46dp"
android:minWidth="46dp"
tools:src="@drawable/mm_recent"
android:scaleType="centerInside"
android:layout_gravity="center"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" >
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimaryAlpha"/>
</shape>
<shape android:shape="rectangle">
<stroke android:width="1px" android:color="@color/colorPrimary" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<stroke android:width="1px" android:color="@color/colorPrimary" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
</selector>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment