Skip to content

Commit

Permalink
Merge pull request #19 from Dhina17/master
Browse files Browse the repository at this point in the history
Colors override
  • Loading branch information
kal72 authored Dec 27, 2021
2 parents 7646f0c + 3ffd904 commit 9ce9e37
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 58 deletions.
Binary file removed rackmonthpicker/src/main/res/drawable/back.png
Binary file not shown.
6 changes: 0 additions & 6 deletions rackmonthpicker/src/main/res/drawable/bg_button_normal.xml

This file was deleted.

7 changes: 0 additions & 7 deletions rackmonthpicker/src/main/res/drawable/bg_button_pressed.xml

This file was deleted.

12 changes: 0 additions & 12 deletions rackmonthpicker/src/main/res/drawable/button.xml

This file was deleted.

Binary file removed rackmonthpicker/src/main/res/drawable/forward.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/colorButtonNormal"
android:pathData="M11.67,3.87L9.9,2.1 0,12l9.9,9.9 1.77,-1.77L3.54,12z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/colorButtonNormal"
android:pathData="M6.23,20.23l1.77,1.77l10,-10l-10,-10l-1.77,1.77l8.23,8.23z" />
</vector>
2 changes: 1 addition & 1 deletion rackmonthpicker/src/main/res/drawable/month_selected.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</item>
<item>
<shape android:shape="oval">
<solid android:color="@color/color_primary"/>
<solid android:color="?attr/colorPrimary"/>
<stroke
android:width="4dp"
android:color="@color/transparent"/>
Expand Down
6 changes: 3 additions & 3 deletions rackmonthpicker/src/main/res/drawable/text_selector.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/white" android:state_selected="true"/>
<item android:color="@android:color/white" android:state_pressed="true"/>
<item android:color="@android:color/black" />
<item android:color="@color/rack_month_picker_month_selected_text_color" android:state_selected="true" />
<item android:color="@color/rack_month_picker_month_selected_text_color" android:state_pressed="true" />
<item android:color="@color/rack_month_picker_month_not_selected_text_color" />
</selector>
7 changes: 0 additions & 7 deletions rackmonthpicker/src/main/res/drawable/window_back.xml

This file was deleted.

38 changes: 19 additions & 19 deletions rackmonthpicker/src/main/res/layout/dialog_month_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
android:layout_gravity="center"
android:minWidth="350dp"
android:orientation="vertical"
android:theme="?android:theme"
android:padding="20dp">
android:padding="20dp"
android:theme="?android:theme">

<LinearLayout
android:id="@+id/material_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/window_back"
android:background="?attr/colorBackgroundFloating"
android:orientation="vertical">

<LinearLayout
Expand All @@ -37,7 +37,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/month_picker"
android:textColor="@android:color/white"
android:textColor="@color/rack_month_picker_title_text_color"
android:textSize="18sp"
android:textStyle="bold" />

Expand Down Expand Up @@ -66,16 +66,16 @@
android:id="@+id/btn_previous"
android:layout_width="60dp"
android:layout_height="25dp"
android:src="@drawable/back" />
android:src="@drawable/ic_baseline_arrow_back_ios_24" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/btn_next"
android:layout_width="60dp"
android:layout_height="25dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/forward" />
android:src="@drawable/ic_baseline_arrow_forward_ios_24" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_year"
Expand All @@ -84,18 +84,18 @@
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:fontFamily="sans-serif"
tools:text="2016"
android:textColor="@color/black_de"
android:textSize="18sp" />
android:textSize="18sp"
android:textStyle="bold"
tools:text="2016" />
</RelativeLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:paddingRight="24dp"
android:paddingLeft="24dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="24dp"
android:paddingRight="24dp">

</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
Expand All @@ -108,29 +108,29 @@
android:layout_height="wrap_content"
android:layout_gravity="right"
android:gravity="center_vertical"
android:paddingBottom="10dp"
android:paddingTop="16dp">
android:paddingTop="16dp"
android:paddingBottom="10dp">

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_n"
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.AppCompat.Button.Colored"
android:fontFamily="sans-serif"
android:padding="10dp"
android:stateListAnimator="@null"
android:text="@string/cancel" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_p"
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:fontFamily="sans-serif"
style="@style/Widget.AppCompat.Button.Colored"
android:padding="10dp"
android:stateListAnimator="@null"
android:text="@string/ok"/>
android:text="@string/ok" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
5 changes: 2 additions & 3 deletions rackmonthpicker/src/main/res/layout/item_view_month.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
android:id="@+id/main_layout"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_margin="5dp"
android:background="@drawable/month_selector"
android:gravity="center"
android:layout_margin="5dp"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="19sp"
android:textColor="@drawable/text_selector"
tools:text="Jan"/>
tools:text="Jan" />
</LinearLayout>
7 changes: 7 additions & 0 deletions rackmonthpicker/src/main/res/values/color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@
<color name="black_de">#DE000000</color>
<color name="color_primary">#009B4C</color>
<color name="transparent">#00000000</color>

<!-- Items can be overridden later from the library -->
<color name="rack_month_picker_title_text_color">@color/white</color>
<color name="rack_month_picker_month_selected_text_color">@color/white</color>
<color name="rack_month_picker_month_not_selected_text_color">
?attr/textColorAlertDialogListItem
</color>
</resources>

0 comments on commit 9ce9e37

Please sign in to comment.