This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
122 changed files
with
2,300 additions
and
703 deletions.
There are no files selected for viewing
239 changes: 212 additions & 27 deletions
239
example/src/main/java/com/ashazar/tabdrawerexample/BaseActivity.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,4 @@ protected void onCreate(Bundle savedInstanceState) { | |
|
||
prepareTabDrawer(); | ||
} | ||
|
||
|
||
} |
Binary file removed
BIN
-167 Bytes
example/src/main/res/drawable-hdpi/ic_accessibility_white_24dp.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 removed
BIN
-195 Bytes
example/src/main/res/drawable-hdpi/ic_collections_bookmark_white_24dp.png
Binary file not shown.
Binary file removed
BIN
-240 Bytes
example/src/main/res/drawable-hdpi/ic_delete_forever_white_24dp.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-279 Bytes
example/src/main/res/drawable-hdpi/ic_event_available_white_24dp.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-244 Bytes
example/src/main/res/drawable-hdpi/ic_folder_shared_white_24dp.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-234 Bytes
example/src/main/res/drawable-hdpi/ic_notifications_white_24dp.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-549 Bytes
example/src/main/res/drawable-hdpi/ic_sentiment_very_satisfied_white_24dp.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-124 Bytes
example/src/main/res/drawable-mdpi/ic_accessibility_white_24dp.png
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-147 Bytes
example/src/main/res/drawable-mdpi/ic_collections_bookmark_white_24dp.png
Diff not rendered.
Binary file removed
BIN
-170 Bytes
example/src/main/res/drawable-mdpi/ic_delete_forever_white_24dp.png
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-200 Bytes
example/src/main/res/drawable-mdpi/ic_event_available_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-178 Bytes
example/src/main/res/drawable-mdpi/ic_folder_shared_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-177 Bytes
example/src/main/res/drawable-mdpi/ic_notifications_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-356 Bytes
example/src/main/res/drawable-mdpi/ic_sentiment_very_satisfied_white_24dp.png
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-166 Bytes
example/src/main/res/drawable-xhdpi/ic_accessibility_white_24dp.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.
Binary file removed
BIN
-222 Bytes
example/src/main/res/drawable-xhdpi/ic_collections_bookmark_white_24dp.png
Diff not rendered.
Binary file removed
BIN
-228 Bytes
example/src/main/res/drawable-xhdpi/ic_delete_forever_white_24dp.png
Diff not rendered.
Binary file removed
BIN
-214 Bytes
example/src/main/res/drawable-xhdpi/ic_description_white_24dp.png
Diff not rendered.
Binary file removed
BIN
-300 Bytes
example/src/main/res/drawable-xhdpi/ic_event_available_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-300 Bytes
example/src/main/res/drawable-xhdpi/ic_folder_shared_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-265 Bytes
example/src/main/res/drawable-xhdpi/ic_notifications_white_24dp.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-701 Bytes
example/src/main/res/drawable-xhdpi/ic_sentiment_very_satisfied_white_24dp.png
Diff not rendered.
Diff not rendered.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
25
example/src/main/res/layout/drawerlayout_with_gridview.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.