Skip to content

Commit

Permalink
added Custom text color + text size
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza Amuzadeh committed Mar 10, 2019
1 parent 0b5bf66 commit bea803f
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 401 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ext {

minSdkVersion = 17
targetSdkVersion = 28
versionCode = 7
versionName = "0.2.2"
versionCode = 8
versionName = "0.2.3"
}

buildscript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {

mBreadcrumbsView = findViewById(R.id.breadcrumbs_view);
mBreadcrumbsView.setItems(new ArrayList<>(Arrays.asList(
BreadcrumbItem.createSimpleItem("Root Path"),
createItem("سلام 1"),
createItem("سلام 2")
BreadcrumbItem.createSimpleItem("Root Path")
)));
mBreadcrumbsView.setCallback(new DefaultBreadcrumbsCallback<BreadcrumbItem>() {
@Override
Expand Down
54 changes: 28 additions & 26 deletions demo/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/coordinator_layout"
tools:context="moe.feng.common.view.breadcrumbs.MainActivity">
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="moe.feng.common.view.breadcrumbs.MainActivity">

<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay"
android:background="?attr/colorPrimary">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay" />

<moe.feng.common.view.breadcrumbs.BreadcrumbsView
android:id="@+id/breadcrumbs_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
<moe.feng.common.view.breadcrumbs.BreadcrumbsView
android:id="@+id/breadcrumbs_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:textColorSelected="@color/colorSelected"
app:textColorUnSelected="@color/colorUnSelected"
app:textSizeCustom="12sp" />

</android.support.design.widget.AppBarLayout>
</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_main"/>
<include layout="@layout/content_main" />

</android.support.design.widget.CoordinatorLayout>
2 changes: 2 additions & 0 deletions demo/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorSelected">#FFFFFF</color>
<color name="colorUnSelected">#777475</color>
</resources>
Loading

0 comments on commit bea803f

Please sign in to comment.