Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Development (#1)
Browse files Browse the repository at this point in the history
* update Readme

* Ability to include TabDrawer in Gradle through JCenter

* Renamed library layout names, incase of name conflict with app's layouts

* Custom Tab Layout. Deleted some TabDrawerLayout attributes and implemented in Model classes

* Full customization of Tabs

* Tab layout optimization

* Fix code & layout if there is no list items of a(ny) tab.

* Added method to force using default(internal) tab layout for a specific tab.

* Fix for force to use default tab layout.

* Ability to use Custom Drawer Layout

* Added drawerLayout to setSelectedTabView() to  modify Drawer Layout

* Deleted mdpi/hdpi/xhdpi icons in sample app

* Deleted old TabDrawerLayout attributes used in v1.0 from sample app

* Added some custom layouts and silly backgrounds to sample app

* Custom Drawer Layout with ListView

* sample app update with custom layouts

* Fixed aspect ratio of animated gif demo

* Added custom drawer list item layout option

* Added Javadocs for missing methods & changed method arg. position

* Some tests on sample app

* ListView in drawer changed to GridView for 2 or more columns

* Update sample app.

* Update sample app custom drawer

* Started customization of List adapter

* Custom drawer list adapter, to customize views. Removed TabDrawerListAdapter

* Move Tab list item color and size properties and methods to Tab

* Ability to Don't Use pre-defined selected/unselected tab&list item views

* Rename TabArray to TabDrawerData and refactor TabDrawerData

* Refactor if /else blocks

* Ability to set Drawer List item's title font.

* Tests on sample app

* Rename methods with ListItemText to ListItemTitle

* Update sample app for method name change.

* Added "drawer_padding" attribute to TabDrawerLayout

* Fix for drawer list visibility issue, when only 1 tab has a drawer.

* Added getTabWithDrawerCount() method to TabDrawerData

* Tests on sample app.

* Tests on sample app

* Added .gif files from sample app for demo

* Changing Color methods of Tabs - p1

* Changing Color methods of Tabs in sample app - p1

* Changing Color methods of Tabs - p2 - finished

* Adapted new methods to the sample app.

* recyclerview

* removed unnecessary files from library

* remove test codes

* Fixed logic mistakes on TabListItem adapter

* Changed Tab layout from LinearLayout to RelativeLayout for more flexibility

* Changes in sample app

* modified default tab list item layout

* build.gradle version update

* update build.gradle

* Updated sample app.

* Added .gif files from sample app for demo

* maven pom description change

* Removed drawerLayout from setSelectedTabView()

* Updated sample app.

* Updated Custom TabDrawer demo .gif file

* Updated Javadocs

* Modified some descriptions, and deleted unnecesarry methods

* Updated readme file

* Updated readme file

* Updated readme

* Updated  readme
  • Loading branch information
ashazar committed Feb 4, 2017
1 parent 46bbcb6 commit f3ce0cd
Show file tree
Hide file tree
Showing 122 changed files with 2,300 additions and 703 deletions.
235 changes: 137 additions & 98 deletions README.md

Large diffs are not rendered by default.

239 changes: 212 additions & 27 deletions example/src/main/java/com/ashazar/tabdrawerexample/BaseActivity.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ protected void onCreate(Bundle savedInstanceState) {

prepareTabDrawer();
}


}
Binary file not shown.
Binary file not shown.
Binary file removed example/src/main/res/drawable-hdpi/ic_action_expand.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Binary file removed example/src/main/res/drawable-mdpi/ic_action_expand.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
7 changes: 7 additions & 0 deletions example/src/main/res/drawable/custom_drawer_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient android:startColor="#990066"
android:endColor="#660099"
android:angle="90"/>
</shape>
19 changes: 19 additions & 0 deletions example/src/main/res/drawable/custom_list_item_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >

<gradient
android:startColor="#44003366"
android:endColor="#446699ff"
android:angle="90"/>

<corners android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:bottomRightRadius="15dp"
android:topRightRadius="15dp" />

<stroke android:width="2dp"
android:color="#66cccccc"
/>

</shape>
8 changes: 8 additions & 0 deletions example/src/main/res/drawable/tab_bg1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:startColor="#033F58"
android:centerColor="#336699"
android:endColor="#033F58"
android:angle="90"/>
</shape>
7 changes: 7 additions & 0 deletions example/src/main/res/drawable/tab_bg2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:startColor="#033F58"
android:endColor="#D6D6D6"
android:angle="90"/>
</shape>
5 changes: 0 additions & 5 deletions example/src/main/res/layout-land/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
5 changes: 0 additions & 5 deletions example/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
8 changes: 8 additions & 0 deletions example/src/main/res/layout/drawer_layout1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tab_bg1">

</RelativeLayout>
17 changes: 17 additions & 0 deletions example/src/main/res/layout/drawerlayout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF726EA9"
>

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:alpha="0.5"
android:tint="@color/colorPrimary"
android:src="@drawable/ic_person_add_white_24dp"/>


</RelativeLayout>
25 changes: 25 additions & 0 deletions example/src/main/res/layout/drawerlayout_with_gridview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp"
android:background="@drawable/custom_drawer_bg"
>

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@android:drawable/gallery_thumb"
android:alpha="0.1"
/>
<GridView
android:id="@+id/drawer_gridview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:numColumns="2"
android:horizontalSpacing="10dp"
android:verticalSpacing="10dp"
/>

</RelativeLayout>
28 changes: 28 additions & 0 deletions example/src/main/res/layout/item_tab.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="10" >

<ImageView
android:id="@+id/tab_icon"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="6"/>

<TextView
android:id="@+id/tab_title"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:gravity="center" />
</LinearLayout>
</RelativeLayout>
28 changes: 28 additions & 0 deletions example/src/main/res/layout/item_tab2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="10" >

<ImageView
android:id="@+id/tab_icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="4"/>

<TextView
android:id="@+id/tab_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:gravity="center" />
</LinearLayout>
</RelativeLayout>
29 changes: 29 additions & 0 deletions example/src/main/res/layout/item_tab3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="10" >

<TextView
android:id="@+id/tab_title"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:gravity="center" />

<ImageView
android:id="@+id/tab_icon"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="6"/>

</LinearLayout>
</RelativeLayout>
29 changes: 29 additions & 0 deletions example/src/main/res/layout/item_tab4.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="10" >

<TextView
android:id="@+id/tab_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:gravity="center" />

<ImageView
android:id="@+id/tab_icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="4"/>

</LinearLayout>
</RelativeLayout>
63 changes: 63 additions & 0 deletions example/src/main/res/layout/list_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"
>


<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:weightSum="10">

<TextView
android:id="@+id/listitem_selected_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center_vertical|end"
android:textSize="26sp"
android:textColor="#ffffff"
android:textStyle="bold"
android:text="\u2E31 \u2022 \u25CF \u2B24"
android:visibility="invisible"
/>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="4">

<ImageView
android:id="@+id/list_item_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />

<TextView
android:id="@+id/list_item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"/>
</LinearLayout>

<TextView
android:id="@+id/listitem_selected_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center_vertical|start"
android:textSize="26sp"
android:textColor="#ffffff"
android:textStyle="bold"
android:text="\u2B24 \u25CF \u2022 \u2E31"
android:visibility="invisible"
/>
</LinearLayout>

</RelativeLayout>
19 changes: 19 additions & 0 deletions example/src/main/res/layout/list_item2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:padding="20dp"
android:background="@drawable/custom_list_item_bg"
>

<ImageView
android:id="@+id/list_item_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
/>

</LinearLayout>
5 changes: 0 additions & 5 deletions example/src/main/res/layout/with_bottom_tabdrawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
5 changes: 0 additions & 5 deletions example/src/main/res/layout/with_left_tabdrawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
5 changes: 0 additions & 5 deletions example/src/main/res/layout/with_right_tabdrawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
5 changes: 0 additions & 5 deletions example/src/main/res/layout/with_top_tabdrawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
tab:defaultSelectedTab="1"
tab:padding="3dp"
tab:list_padding="16dp"
tab:titleSize="6sp"
tab:titleColor="@color/tabTitle"
tab:titleColor_selected="@color/tabTitle_selected"
tab:backgroundColor="@color/tabBackground"
tab:backgroundColor_selected="@color/tabBackground_selected"
/>

</RelativeLayout>
Binary file removed images/demo.gif
Diff not rendered.
Binary file added images/tabdrawer_demo.gif
Binary file added images/tabdrawer_demo_custom.gif
Binary file added images/tabdrawer_demo_tabbar.gif
Loading

0 comments on commit f3ce0cd

Please sign in to comment.