diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-04 16:08:03 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-07-04 16:08:03 -0700 |
commit | cf2a7fcd0880a8d276970124cdb5d5845d5631fe (patch) | |
tree | cc38ead7853ddb85c9c988e94a4af605e1e676f8 /core/src/main/res | |
parent | fe4632c34a1d671503e0242a269865b884545e13 (diff) | |
download | kau-cf2a7fcd0880a8d276970124cdb5d5845d5631fe.tar.gz kau-cf2a7fcd0880a8d276970124cdb5d5845d5631fe.tar.bz2 kau-cf2a7fcd0880a8d276970124cdb5d5845d5631fe.zip |
Separate core components in its own module
Diffstat (limited to 'core/src/main/res')
45 files changed, 1294 insertions, 0 deletions
diff --git a/core/src/main/res/anim/kau_fade_in.xml b/core/src/main/res/anim/kau_fade_in.xml new file mode 100644 index 0000000..03312a2 --- /dev/null +++ b/core/src/main/res/anim/kau_fade_in.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<alpha xmlns:android="http://schemas.android.com/apk/res/android" + android:duration="@android:integer/config_shortAnimTime" + android:fromAlpha="0.0" + android:toAlpha="1.0" />
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_fade_out.xml b/core/src/main/res/anim/kau_fade_out.xml new file mode 100644 index 0000000..322befc --- /dev/null +++ b/core/src/main/res/anim/kau_fade_out.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<alpha xmlns:android="http://schemas.android.com/apk/res/android" + android:duration="@android:integer/config_shortAnimTime" + android:fromAlpha="1.0" + android:toAlpha="0.0" />
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_in_bottom.xml b/core/src/main/res/anim/kau_slide_in_bottom.xml new file mode 100644 index 0000000..a07cba4 --- /dev/null +++ b/core/src/main/res/anim/kau_slide_in_bottom.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromYDelta="100%p" + android:toYDelta="0" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_in_left.xml b/core/src/main/res/anim/kau_slide_in_left.xml new file mode 100644 index 0000000..828bdae --- /dev/null +++ b/core/src/main/res/anim/kau_slide_in_left.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="-100%p" + android:toXDelta="0" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_in_right.xml b/core/src/main/res/anim/kau_slide_in_right.xml new file mode 100644 index 0000000..0f9fbce --- /dev/null +++ b/core/src/main/res/anim/kau_slide_in_right.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="100%p" + android:toXDelta="0" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_in_top.xml b/core/src/main/res/anim/kau_slide_in_top.xml new file mode 100644 index 0000000..8caee9b --- /dev/null +++ b/core/src/main/res/anim/kau_slide_in_top.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromYDelta="-100%p" + android:toYDelta="0" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_out_bottom.xml b/core/src/main/res/anim/kau_slide_out_bottom.xml new file mode 100644 index 0000000..44e7e21 --- /dev/null +++ b/core/src/main/res/anim/kau_slide_out_bottom.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromYDelta="0" + android:toYDelta="100%p" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_out_left.xml b/core/src/main/res/anim/kau_slide_out_left.xml new file mode 100644 index 0000000..6fab33e --- /dev/null +++ b/core/src/main/res/anim/kau_slide_out_left.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="0" + android:toXDelta="-100%p" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_out_right.xml b/core/src/main/res/anim/kau_slide_out_right.xml new file mode 100644 index 0000000..9322741 --- /dev/null +++ b/core/src/main/res/anim/kau_slide_out_right.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="0" + android:toXDelta="100%p" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_out_right_top.xml b/core/src/main/res/anim/kau_slide_out_right_top.xml new file mode 100644 index 0000000..5b63474 --- /dev/null +++ b/core/src/main/res/anim/kau_slide_out_right_top.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:zAdjustment="top"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromXDelta="0" + android:toXDelta="100%p" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/anim/kau_slide_out_top.xml b/core/src/main/res/anim/kau_slide_out_top.xml new file mode 100644 index 0000000..9f8e14c --- /dev/null +++ b/core/src/main/res/anim/kau_slide_out_top.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <translate + android:duration="@android:integer/config_shortAnimTime" + android:fromYDelta="0" + android:toYDelta="-100%p" /> +</set>
\ No newline at end of file diff --git a/core/src/main/res/drawable/kau_transparent.xml b/core/src/main/res/drawable/kau_transparent.xml new file mode 100644 index 0000000..399a46b --- /dev/null +++ b/core/src/main/res/drawable/kau_transparent.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@android:color/transparent" /> +</shape>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_about_section_libraries.xml b/core/src/main/res/layout/kau_about_section_libraries.xml new file mode 100644 index 0000000..45c271b --- /dev/null +++ b/core/src/main/res/layout/kau_about_section_libraries.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/about_library_container" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView + android:id="@+id/about_library_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/activity_horizontal_margin" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <android.support.v7.widget.RecyclerView + android:id="@+id/about_library_recycler" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/about_library_title" /> + +</android.support.constraint.ConstraintLayout> diff --git a/core/src/main/res/layout/kau_about_section_main.xml b/core/src/main/res/layout/kau_about_section_main.xml new file mode 100644 index 0000000..40d8dfb --- /dev/null +++ b/core/src/main/res/layout/kau_about_section_main.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v4.widget.NestedScrollView 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" + tools:showIn="@layout/kau_activity_about"> + + <android.support.constraint.ConstraintLayout + android:id="@+id/about_main_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ca.allanwang.kau.views.CutoutView + android:id="@+id/about_main_cutout" + android:layout_width="0dp" + android:layout_height="@dimen/kau_about_header_height" + android:minHeight="@dimen/kau_about_header_height" + app:foregroundColor="?android:colorAccent" + app:heightPercentageToScreen="0.5" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <FrameLayout + android:id="@+id/about_main_bottom_container" + android:layout_width="0dp" + android:layout_height="2000dp" + android:background="?android:attr/colorBackground" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/about_main_cutout"> + + <TextView + android:id="@+id/about_main_bottom_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="@dimen/activity_horizontal_margin" /> + + </FrameLayout> + + </android.support.constraint.ConstraintLayout> + +</android.support.v4.widget.NestedScrollView> diff --git a/core/src/main/res/layout/kau_activity_about.xml b/core/src/main/res/layout/kau_activity_about.xml new file mode 100644 index 0000000..33cc781 --- /dev/null +++ b/core/src/main/res/layout/kau_activity_about.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/about_draggable_frame" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:dragDismissDistance="@dimen/kau_drag_dismiss_distance" + app:dragDismissScale="0.95" + tools:context=".about.AboutActivityBase"> + + <android.support.v4.view.ViewPager + android:id="@+id/about_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + <ca.allanwang.kau.widgets.InkPageIndicator + android:id="@+id/about_indicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|center_horizontal" + android:layout_marginTop="@dimen/kau_padding_normal" + app:pageIndicatorColor="@color/kau_about_page_indicator_dark" + app:currentPageIndicatorColor="@color/kau_about_page_indicator_dark_selected" /> + +</ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout> diff --git a/core/src/main/res/layout/kau_activity_kpref.xml b/core/src/main/res/layout/kau_activity_kpref.xml new file mode 100644 index 0000000..05cacb5 --- /dev/null +++ b/core/src/main/res/layout/kau_activity_kpref.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_container" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <ca.allanwang.kau.views.RippleCanvas + android:id="@+id/kau_toolbar_ripple" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="@+id/kau_toolbar" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <android.support.v7.widget.Toolbar + android:id="@id/kau_toolbar" + android:layout_width="0dp" + android:layout_height="?attr/actionBarSize" + android:layout_marginTop="@dimen/kau_status_bar_height" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <ca.allanwang.kau.widgets.TextSlider + android:id="@+id/kau_toolbar_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + app:animation_type="slide_horizontal" /> + + </android.support.v7.widget.Toolbar> + + <ca.allanwang.kau.views.RippleCanvas + android:id="@+id/kau_ripple" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/kau_toolbar" /> + + <ViewAnimator + android:id="@+id/kau_holder" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/kau_toolbar" /> + +</android.support.constraint.ConstraintLayout> diff --git a/core/src/main/res/layout/kau_changelog_content.xml b/core/src/main/res/layout/kau_changelog_content.xml new file mode 100644 index 0000000..92b87b9 --- /dev/null +++ b/core/src/main/res/layout/kau_changelog_content.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingBottom="8.4sp" + android:paddingLeft="@dimen/kau_dialog_margin" + android:paddingRight="@dimen/kau_dialog_margin"> + + <!--padding bottom is 14sp * 0.6--> + + <TextView + android:id="@+id/kau_changelog_bullet" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:lineSpacingMultiplier="1.6" + android:paddingRight="5dp" + android:text="@string/kau_u2022" + android:textAppearance="@style/TextAppearance.AppCompat.Small" /> + + <TextView + android:id="@+id/kau_changelog_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:lineSpacingMultiplier="1.6" + android:textAppearance="@style/TextAppearance.AppCompat.Small" /> + +</LinearLayout>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_changelog_title.xml b/core/src/main/res/layout/kau_changelog_title.xml new file mode 100644 index 0000000..e885e02 --- /dev/null +++ b/core/src/main/res/layout/kau_changelog_title.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_changelog_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:lineSpacingMultiplier="1.6" + android:paddingBottom="@dimen/kau_dialog_margin_bottom" + android:paddingLeft="@dimen/kau_dialog_margin" + android:paddingRight="@dimen/kau_dialog_margin" + android:paddingTop="@dimen/kau_dialog_margin_bottom" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + android:textStyle="bold" /> + diff --git a/core/src/main/res/layout/kau_iitem_card.xml b/core/src/main/res/layout/kau_iitem_card.xml new file mode 100644 index 0000000..621da2e --- /dev/null +++ b/core/src/main/res/layout/kau_iitem_card.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + Generic card with an imageview, title, description, and button + --> +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_card_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:background="?android:selectableItemBackground" + android:minHeight="?android:listPreferredItemHeight"> + + <android.support.constraint.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/kau_padding_normal" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingTop="@dimen/kau_padding_normal"> + + <ImageView + android:id="@+id/kau_card_image" + android:layout_width="@dimen/kau_avatar_bounds" + android:layout_height="@dimen/kau_avatar_bounds" + android:layout_marginEnd="@dimen/kau_avatar_margin" + android:layout_marginStart="@dimen/kau_avatar_margin" + android:padding="@dimen/kau_avatar_padding" + android:scaleType="fitCenter" + android:visibility="gone" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + + <TextView + android:id="@+id/kau_card_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toTopOf="parent" + app:layout_goneMarginStart="@dimen/kau_padding_normal" /> + + <TextView + android:id="@+id/kau_card_description" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toBottomOf="@id/kau_card_title" + app:layout_goneMarginStart="@dimen/kau_padding_normal" /> + + <LinearLayout + android:id="@+id/kau_card_bottom_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toBottomOf="@id/kau_card_description" + app:layout_goneMarginStart="@dimen/kau_padding_normal"> + + <Button + android:id="@+id/kau_card_button" + style="?android:borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/kau_spacing_normal" + android:textColor="?attr/colorAccent" /> + + </LinearLayout> + + </android.support.constraint.ConstraintLayout> + +</android.support.v7.widget.CardView> diff --git a/core/src/main/res/layout/kau_iitem_cutout.xml b/core/src/main/res/layout/kau_iitem_cutout.xml new file mode 100644 index 0000000..a4b17ac --- /dev/null +++ b/core/src/main/res/layout/kau_iitem_cutout.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<ca.allanwang.kau.views.CutoutView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_cutout" + android:layout_width="match_parent" + android:layout_height="@dimen/kau_about_header_height" + android:minHeight="@dimen/kau_about_header_height" + app:foregroundColor="?android:colorAccent" + app:heightPercentageToScreen="0.5" />
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_iitem_header.xml b/core/src/main/res/layout/kau_iitem_header.xml new file mode 100644 index 0000000..fa5a595 --- /dev/null +++ b/core/src/main/res/layout/kau_iitem_header.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:orientation="vertical"> + + <TextView + android:id="@+id/kau_header_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/kau_spacing_xlarge" + android:padding="@dimen/kau_padding_normal" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + +</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_iitem_library.xml b/core/src/main/res/layout/kau_iitem_library.xml new file mode 100644 index 0000000..1c3de5c --- /dev/null +++ b/core/src/main/res/layout/kau_iitem_library.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.CardView 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/lib_item_card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:background="?android:selectableItemBackground" + android:clickable="true"> + + <android.support.constraint.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/kau_padding_normal" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingStart="@dimen/kau_padding_normal" + android:paddingTop="@dimen/kau_padding_normal"> + + <android.support.constraint.Guideline + android:id="@+id/lib_g_m_v" + android:layout_width="1dp" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.5" /> + + <TextView + android:id="@+id/lib_item_name" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:ellipsize="end" + android:gravity="start" + android:maxLines="1" + android:textSize="@dimen/textSizeLarge_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="Library name" /> + + <TextView + android:id="@+id/lib_item_author" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:gravity="end" + android:maxLines="2" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/lib_g_m_v" + app:layout_constraintTop_toTopOf="parent" + tools:text="Author" /> + + <android.support.constraint.Barrier + android:id="@+id/lib_item_top_divider" + android:layout_width="wrap_content" + android:layout_height="1px" + android:layout_marginTop="@dimen/kau_spacing_micro" + app:barrierDirection="bottom" + app:constraint_referenced_ids="lib_item_name,lib_item_author" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/lib_item_description" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:maxLines="20" + android:paddingBottom="@dimen/kau_spacing_normal" + android:paddingTop="@dimen/kau_spacing_normal" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_top_divider" + tools:text="Description" /> + + <View + android:id="@+id/lib_item_bottom_divider" + android:layout_width="match_parent" + android:layout_height="1px" + android:layout_marginTop="@dimen/kau_spacing_micro" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_description" /> + + <TextView + android:id="@+id/lib_item_version" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/kau_spacing_normal" + android:layout_marginTop="@dimen/kau_spacing_micro" + android:layout_weight="1" + android:gravity="start" + android:maxLines="1" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" + tools:text="Version" /> + + <TextView + android:id="@+id/lib_item_license" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/kau_spacing_normal" + android:layout_marginTop="@dimen/kau_spacing_micro" + android:layout_weight="1" + android:gravity="end" + android:maxLines="1" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/lib_g_m_v" + app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" + tools:text="License" /> + + </android.support.constraint.ConstraintLayout> + +</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_preference.xml b/core/src/main/res/layout/kau_preference.xml new file mode 100644 index 0000000..c49951b --- /dev/null +++ b/core/src/main/res/layout/kau_preference.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!--due to animations, we need a wrapper viewgroup so our changes will stick--> + +<LinearLayout 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="wrap_content" + android:baselineAligned="false" + android:clipToPadding="false" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:orientation="horizontal"> + + <android.support.constraint.ConstraintLayout + android:id="@+id/kau_pref_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?android:attr/selectableItemBackground" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingStart="?android:attr/listPreferredItemPaddingStart"> + + <!--As per Android N, icons (24dp) are aligned to the left rather than centered--> + + <ImageView + android:id="@+id/kau_pref_icon" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_marginBottom="4dp" + android:layout_marginTop="4dp" + android:contentDescription="@string/kau_pref_icon" + android:paddingEnd="32dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.5" + tools:layout_editor_absoluteX="0dp" /> + + <TextView + android:id="@+id/kau_pref_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceListItem" + android:textColor="?android:attr/textColorPrimary" + app:layout_constraintBottom_toTopOf="@+id/kau_pref_desc" + app:layout_constraintEnd_toStartOf="@+id/kau_pref_inner_frame" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintStart_toEndOf="@id/kau_pref_icon" + app:layout_constraintTop_toTopOf="parent" + app:layout_goneMarginBottom="16dp" + tools:layout_editor_absoluteX="-175dp" /> + + <TextView + android:id="@id/kau_pref_desc" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:ellipsize="end" + android:maxLines="10" + android:textAppearance="?android:attr/textAppearanceListItemSecondary" + android:textColor="?android:attr/textColorSecondary" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintStart_toEndOf="@id/kau_pref_icon" + app:layout_constraintTop_toBottomOf="@id/kau_pref_title" + tools:layout_editor_absoluteX="-175dp" /> + + <android.support.constraint.Barrier + android:id="@+id/kau_pref_barrier" + android:layout_width="1dp" + android:layout_height="wrap_content" + app:barrierDirection="end" + app:constraint_referenced_ids="kau_pref_title,kau_pref_desc" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <LinearLayout + android:id="@id/kau_pref_inner_frame" + android:layout_width="wrap_content" + android:layout_height="0dp" + android:gravity="center_vertical|end" + android:orientation="horizontal" + android:paddingStart="16dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@id/kau_pref_barrier" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.5" + tools:layout_editor_absoluteX="1dp" /> + + </android.support.constraint.ConstraintLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_preference_checkbox.xml b/core/src/main/res/layout/kau_preference_checkbox.xml new file mode 100644 index 0000000..5ab368b --- /dev/null +++ b/core/src/main/res/layout/kau_preference_checkbox.xml @@ -0,0 +1,7 @@ +<CheckBox xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_pref_inner_content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:focusable="false" + android:clickable="false" + android:background="@null" />
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_preference_color_preview.xml b/core/src/main/res/layout/kau_preference_color_preview.xml new file mode 100644 index 0000000..2374971 --- /dev/null +++ b/core/src/main/res/layout/kau_preference_color_preview.xml @@ -0,0 +1,6 @@ +<ca.allanwang.kau.dialogs.color.CircleView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_pref_inner_content" + android:layout_width="40dp" + android:layout_height="40dp" + android:focusable="false" + android:clickable="false" />
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_preference_header.xml b/core/src/main/res/layout/kau_preference_header.xml new file mode 100644 index 0000000..5deece3 --- /dev/null +++ b/core/src/main/res/layout/kau_preference_header.xml @@ -0,0 +1,10 @@ +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_pref_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dip" + android:paddingEnd="?android:attr/listPreferredItemPaddingRight" + android:paddingStart="?android:attr/listPreferredItemPaddingLeft" + android:paddingTop="16dip" + android:textColor="?android:attr/colorAccent" + android:textSize="14sp" />
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_preference_text.xml b/core/src/main/res/layout/kau_preference_text.xml new file mode 100644 index 0000000..bbabdfb --- /dev/null +++ b/core/src/main/res/layout/kau_preference_text.xml @@ -0,0 +1,7 @@ +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_pref_inner_content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:focusable="false" + android:clickable="false" + android:background="@null" />
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_recycler_detached_background.xml b/core/src/main/res/layout/kau_recycler_detached_background.xml new file mode 100644 index 0000000..7295d66 --- /dev/null +++ b/core/src/main/res/layout/kau_recycler_detached_background.xml @@ -0,0 +1,27 @@ +<?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:layout_height="wrap_content"> + + <!-- we use a parallel view for the background rather than just setting a background on the + recycler view for a nicer return transition. i.e. we want the background to fade and the + list to slide out separately --> + <View + android:id="@+id/kau_recycler_detached_background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:colorBackground" /> + + <!--defaults to a LinearLayoutManager--> + + <android.support.v7.widget.RecyclerView + android:id="@+id/kau_recycler_detached" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingBottom="@dimen/kau_spacing_normal" + android:scrollbars="vertical" + app:layoutManager="android.support.v7.widget.LinearLayoutManager" /> + +</FrameLayout> diff --git a/core/src/main/res/layout/kau_recycler_textslider.xml b/core/src/main/res/layout/kau_recycler_textslider.xml new file mode 100644 index 0000000..1402cfb --- /dev/null +++ b/core/src/main/res/layout/kau_recycler_textslider.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_container" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <android.support.v7.widget.Toolbar + android:id="@+id/kau_toolbar" + android:layout_width="0dp" + android:layout_height="?attr/actionBarSize" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <ca.allanwang.kau.widgets.TextSlider + android:id="@+id/kau_toolbar_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + app:animation_type="slide_vertical" /> + + </android.support.v7.widget.Toolbar> + + <android.support.v7.widget.RecyclerView + android:id="@+id/kau_recycler" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/kau_toolbar" /> + +</android.support.constraint.ConstraintLayout> diff --git a/core/src/main/res/layout/kau_search_iitem.xml b/core/src/main/res/layout/kau_search_iitem.xml new file mode 100644 index 0000000..efd7260 --- /dev/null +++ b/core/src/main/res/layout/kau_search_iitem.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/search_item_frame" + android:layout_width="match_parent" + android:layout_height="@dimen/kau_search_item_height" + android:background="?android:attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:gravity="start|center_vertical" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/search_icon" + android:layout_width="@dimen/kau_search_icon" + android:layout_height="0dp" + android:contentDescription="@string/kau_search" + android:scaleType="centerInside" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/search_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="start|center_vertical" + android:layout_weight="1" + android:ellipsize="end" + android:gravity="start|center_vertical" + android:maxLines="1" + android:paddingEnd="@dimen/kau_search_key_line_16" + android:paddingStart="@dimen/kau_search_key_line_8" + android:textIsSelectable="false" + android:textSize="@dimen/kau_search_text_small" + app:layout_constraintBottom_toTopOf="@+id/search_desc" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/search_icon" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.5" /> + + <TextView + android:id="@id/search_desc" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="start|center_vertical" + android:layout_weight="1" + android:ellipsize="end" + android:gravity="start|center_vertical" + android:maxLines="1" + android:paddingEnd="@dimen/kau_search_key_line_16" + android:paddingStart="@dimen/kau_search_key_line_8" + android:textIsSelectable="false" + android:textSize="@dimen/kau_search_text_micro" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/search_icon" + app:layout_constraintTop_toBottomOf="@id/search_title" /> + +</android.support.constraint.ConstraintLayout>
\ No newline at end of file diff --git a/core/src/main/res/layout/kau_search_view.xml b/core/src/main/res/layout/kau_search_view.xml new file mode 100644 index 0000000..ff9fd74 --- /dev/null +++ b/core/src/main/res/layout/kau_search_view.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <View + android:id="@+id/search_shadow" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/kau_shadow_overlay" + android:visibility="gone" /> + + <ca.allanwang.kau.views.BoundedCardView + android:id="@+id/search_cardview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/kau_search_base_margin" + android:layout_marginStart="@dimen/kau_search_base_margin" + app:cardCornerRadius="@dimen/kau_search_base_corners" + app:maxHeightPercent="0.9"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="@dimen/kau_search_height" + android:focusable="true" + android:focusableInTouchMode="true" + android:gravity="start|center_vertical" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/search_nav" + android:layout_width="@dimen/kau_search_icon" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:contentDescription="@string/kau_search" + android:focusable="true" + android:scaleType="centerInside" /> + + <android.support.v7.widget.AppCompatEditText + android:id="@+id/search_edit_text" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_gravity="start|center_vertical" + android:layout_weight="1" + android:background="@android:color/transparent" + android:ellipsize="end" + android:ems="10" + android:gravity="start|center_vertical" + android:imeOptions="actionSearch|flagNoExtractUi" + android:inputType="textNoSuggestions" + android:maxLines="1" + android:paddingEnd="@dimen/kau_search_key_line_16" + android:paddingStart="@dimen/kau_search_key_line_8" + android:privateImeOptions="nm" + android:textSize="@dimen/kau_search_text_medium" + android:windowSoftInputMode="stateAlwaysHidden" /> + + <ProgressBar + android:id="@+id/search_progress" + style="?android:attr/indeterminateProgressStyle" + android:layout_width="@dimen/kau_search_progress" + android:layout_height="match_parent" + android:visibility="gone" /> + + <ImageView + android:id="@+id/search_extra" + android:layout_width="48dp" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:contentDescription="@string/kau_search" + android:focusable="true" + android:scaleType="center" + android:visibility="gone" /> + + <ImageView + android:id="@+id/search_clear" + android:layout_width="48dp" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:contentDescription="@string/kau_search" + android:focusable="true" + android:scaleType="center" /> + + </LinearLayout> + + <View + android:id="@+id/search_divider" + android:layout_width="match_parent" + android:layout_height="@dimen/kau_search_divider" + android:background="?android:attr/listDivider" /> + + <android.support.v7.widget.RecyclerView + android:id="@+id/search_recycler" + android:layout_width="match_parent" + android:layout_height="wrap_content" + + android:overScrollMode="never" + android:visibility="gone" /> + + </LinearLayout> + + </ca.allanwang.kau.views.BoundedCardView> + +</merge>
\ No newline at end of file diff --git a/core/src/main/res/transition/kau_about_return_downward.xml b/core/src/main/res/transition/kau_about_return_downward.xml new file mode 100644 index 0000000..b040b1b --- /dev/null +++ b/core/src/main/res/transition/kau_about_return_downward.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<transitionSet + xmlns:android="http://schemas.android.com/apk/res/android" + android:transitionOrdering="together" + android:interpolator="@android:interpolator/fast_out_linear_in"> + + <slide + android:slideEdge="bottom" + android:duration="400"> + <targets> + <target android:excludeId="@android:id/navigationBarBackground" /> + <target android:excludeId="@android:id/statusBarBackground" /> + </targets> + </slide> + + <fade + android:startDelay="200" + android:duration="200"> + <targets> + <target android:targetId="@id/about_indicator" /> + <!--<target android:targetId="@id/libraries_intro" />--> + <!--<target android:targetId="@id/libs_list_background" />--> + </targets> + </fade> + + <fade android:duration="400"> + <targets> + <target android:targetId="@android:id/navigationBarBackground" /> + <target android:targetId="@android:id/statusBarBackground" /> + </targets> + </fade> + +</transitionSet> diff --git a/core/src/main/res/transition/kau_about_return_upwards.xml b/core/src/main/res/transition/kau_about_return_upwards.xml new file mode 100644 index 0000000..64b3f5e --- /dev/null +++ b/core/src/main/res/transition/kau_about_return_upwards.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<transitionSet + xmlns:android="http://schemas.android.com/apk/res/android" + android:transitionOrdering="together" + android:interpolator="@android:interpolator/fast_out_linear_in"> + + <slide + android:slideEdge="top" + android:duration="400"> + <targets> + <target android:excludeId="@android:id/navigationBarBackground" /> + <target android:excludeId="@android:id/statusBarBackground" /> + </targets> + </slide> + + <fade + android:startDelay="200" + android:duration="200"> + <targets> + <target android:targetId="@id/about_indicator" /> + <!--<target android:targetId="@id/libraries_intro" />--> + <!--<target android:targetId="@id/libs_list_background" />--> + + </targets> + </fade> + + <fade android:duration="400"> + <targets> + <target android:targetId="@android:id/navigationBarBackground" /> + <target android:targetId="@android:id/statusBarBackground" /> + </targets> + </fade> + +</transitionSet> diff --git a/core/src/main/res/transition/kau_enter_slide_top.xml b/core/src/main/res/transition/kau_enter_slide_top.xml new file mode 100644 index 0000000..0089b84 --- /dev/null +++ b/core/src/main/res/transition/kau_enter_slide_top.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright 2015 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<transitionSet + xmlns:android="http://schemas.android.com/apk/res/android" + android:transitionOrdering="together" + android:duration="400" + android:interpolator="@android:interpolator/linear_out_slow_in"> + + <slide android:slideEdge="top"> + <targets> + <target android:excludeId="@android:id/navigationBarBackground" /> + <target android:excludeId="@android:id/statusBarBackground" /> + </targets> + </slide> + + <fade android:duration="@android:integer/config_mediumAnimTime"> + <targets> + <target android:targetId="@android:id/navigationBarBackground" /> + <target android:targetId="@android:id/statusBarBackground" /> + </targets> + </fade> + +</transitionSet> diff --git a/core/src/main/res/values/attr.xml b/core/src/main/res/values/attr.xml new file mode 100644 index 0000000..49be8d9 --- /dev/null +++ b/core/src/main/res/values/attr.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName"> + + <declare-styleable name="BoundedCardView"> + <attr name="maxHeight" format="dimension" /> + <attr name="maxHeightPercent" format="float" /> + </declare-styleable> + + <declare-styleable name="TextSlider"> + <attr name="animation_type" format="enum"> + <enum name="none" value="1000" /> + <enum name="slide_horizontal" value="1001" /> + <enum name="slide_vertical" value="1002" /> + </attr> + </declare-styleable> + + <declare-styleable name="InkPageIndicator"> + <attr name="dotDiameter" format="dimension" /> + <attr name="dotGap" format="dimension" /> + <attr name="animationDuration" format="integer" /> + <attr name="pageIndicatorColor" format="color" /> + <attr name="currentPageIndicatorColor" format="color" /> + </declare-styleable> + + <declare-styleable name="ElasticDragDismissFrameLayout"> + <attr name="dragDismissDistance" format="dimension" /> + <attr name="dragDismissFraction" format="float" /> + <attr name="dragDismissScale" format="float" /> + <attr name="dragElasticity" format="float" /> + </declare-styleable> + + <declare-styleable name="CutoutView"> + <attr name="foregroundColor" format="color" /> + <attr name="android:text" /> + <attr name="android:drawable" /> + <attr name="android:minHeight" /> + <attr name="heightPercentageToScreen" format="float" /> + <attr name="font"/> + </declare-styleable> + +</resources>
\ No newline at end of file diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml new file mode 100644 index 0000000..6d51597 --- /dev/null +++ b/core/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<resources> + <color name="kau_shadow_overlay">#80000000</color> + + <color name="kau_about_page_indicator_dark">#80ffffff</color> + <color name="kau_about_page_indicator_dark_selected">#fff</color> +</resources> diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml new file mode 100644 index 0000000..5bf6da4 --- /dev/null +++ b/core/src/main/res/values/dimens.xml @@ -0,0 +1,37 @@ +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="kau_activity_horizontal_margin">16dp</dimen> + <dimen name="kau_activity_vertical_margin">16dp</dimen> + <dimen name="kau_dialog_margin">24dp</dimen> + <dimen name="kau_dialog_margin_bottom">16dp</dimen> + + <dimen name="kau_fab_margin">16dp</dimen> + <dimen name="kau_appbar_padding_top">8dp</dimen> + <dimen name="kau_splash_logo">16dp</dimen> + <dimen name="kau_progress_bar_height">1dip</dimen> + <dimen name="kau_account_image_size">100dp</dimen> + <dimen name="kau_color_circle_size">56dp</dimen> + + <dimen name="kau_status_bar_height">24dp</dimen> + <dimen name="kau_drag_dismiss_distance">112dp</dimen> <!-- 2 * ?android:actionBarSize --> + + <dimen name="kau_spacing_normal">8dp</dimen> + <dimen name="kau_spacing_micro">4dp</dimen> + <dimen name="kau_spacing_large">32dp</dimen> + <dimen name="kau_spacing_xlarge">48dp</dimen> + <dimen name="kau_spacing_huge">64dp</dimen> + <dimen name="kau_padding_normal">16dp</dimen> + <dimen name="kau_padding_large">24dp</dimen> + <dimen name="kau_fab_size">56dp</dimen> + <dimen name="kau_fab_radius">28dp</dimen> + <dimen name="kau_display_4_text_size">112sp</dimen> + + <dimen name="kau_about_header_height">224dp</dimen> + + <!-- avatar should be a 40dp asset in a 48dp touch target & optically aligned with standard padding --> + <dimen name="kau_avatar_size">40dp</dimen> + <dimen name="kau_avatar_bounds">48dp</dimen> + <dimen name="kau_avatar_padding">4dp</dimen> <!-- (avatar_bounds - avatar_size) / 2 --> + <dimen name="kau_avatar_margin">12dp</dimen> <!-- padding_normal - avatar_padding --> + <dimen name="kau_avatar_ripple_radius">20dp</dimen> <!-- avatar_size / 2 --> +</resources> diff --git a/core/src/main/res/values/dimens_search.xml b/core/src/main/res/values/dimens_search.xml new file mode 100644 index 0000000..acf79cb --- /dev/null +++ b/core/src/main/res/values/dimens_search.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <dimen name="kau_search_height">46dp</dimen> + + <dimen name="kau_search_base_margin">4dp</dimen> + <dimen name="kau_search_base_corners">2dp</dimen> + <dimen name="kau_search_key_line_8">8dp</dimen> + <dimen name="kau_search_key_line_16">16dp</dimen> + <dimen name="kau_search_divider">1dp</dimen> + + <dimen name="kau_search_item_margin_text">24dp</dimen> + <dimen name="kau_search_item_height">56dp</dimen> + <dimen name="kau_search_icon">56dp</dimen> + <dimen name="kau_search_progress">24dp</dimen> + <dimen name="kau_search_text_micro">12sp</dimen> + <dimen name="kau_search_text_small">14sp</dimen> + <dimen name="kau_search_text_medium">16sp</dimen> + <dimen name="kau_search_reveal">24dp</dimen> + + <dimen name="kau_search_filter_margin_top">4dp</dimen> + <dimen name="kau_search_filter_margin_start">12dp</dimen> + + <dimen name="kau_search_menu_item_margin">1dp</dimen> + <dimen name="kau_search_menu_item_margin_left_right">2dp</dimen> + +</resources>
\ No newline at end of file diff --git a/core/src/main/res/values/ids.xml b/core/src/main/res/values/ids.xml new file mode 100644 index 0000000..dd42392 --- /dev/null +++ b/core/src/main/res/values/ids.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <item name="kau_item_account" type="id" /> + <item name="kau_item_pref_header" type="id" /> + <item name="kau_item_pref_text" type="id" /> + <item name="kau_item_pref_checkbox" type="id" /> + <item name="kau_item_pref_color_picker" type="id" /> + <item name="kau_item_pref_sub_item" type="id" /> + <item name="kau_item_pref_plain_text" type="id" /> + <item name="kau_item_search" type="id" /> + <item name="kau_item_cutout" type="id" /> + <item name="kau_item_header_big_margin_top" type="id" /> + <item name="kau_item_card" type="id" /> + <item name="kau_item_library" type="id" /> + <item name="kau_item_about_main" type="id" /> +</resources>
\ No newline at end of file diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml new file mode 100644 index 0000000..5ea5a23 --- /dev/null +++ b/core/src/main/res/values/strings.xml @@ -0,0 +1,15 @@ +<resources> + <string name="kau_u2022">•</string> + <string name="kau_color_picker">Color Picker</string> + + <!--Color Picker--> + <string name="kau_md_custom">Custom</string> + <string name="kau_md_presets">Presets</string> + <string name="kau_md_color_palette">Color Palette</string> + + <string name="kau_kpref_title_placeholder">Title Placeholder</string> + <string name="kau_pref_icon">Pref Icon</string> + + <string name="kau_about_libraries_intro">This app would not be possible without the following great libraries.</string> + <string name="kau_dependencies_used">Dependencies Used</string> +</resources> diff --git a/core/src/main/res/values/strings_about.xml b/core/src/main/res/values/strings_about.xml new file mode 100644 index 0000000..e659fc3 --- /dev/null +++ b/core/src/main/res/values/strings_about.xml @@ -0,0 +1,27 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <string name="library_kau_libraryVersion" tools:ignore="ResourceName">1.4</string> + + <string name="define_kau" tools:ignore="ResourceName" /> + <!-- Author section --> + <string name="library_kau_author" tools:ignore="ResourceName">Allan Wang</string> + <string name="library_kau_authorWebsite" tools:ignore="ResourceName">https://www.allanwang.ca/dev/</string> + <!-- Library section --> + <string name="library_kau_libraryName" tools:ignore="ResourceName">KAU</string> + <string name="library_kau_libraryDescription" tools:ignore="ResourceName"> + <![CDATA[ + An extensive collection of Kotlin Android Utilities. + <br/><br/> + KAU aims to make many common functions executable in one line. It adds numerous extensions to match Kotlin\'s DSL, + and supports completely customizable view groups that are used in almost any app project. + ]]> + </string> + <string name="library_kau_libraryWebsite" tools:ignore="ResourceName">https://allanwang.github.io/KAU/</string> + <!-- OpenSource section --> + <string name="library_kau_isOpenSource" tools:ignore="ResourceName">true</string> + <string name="library_kau_repositoryLink" tools:ignore="ResourceName">https://github.com/AllanWang/KAU</string> + <!-- ClassPath for autoDetect section --> + <string name="library_kau_classPath" tools:ignore="ResourceName">ca.allanwang.kau</string> + <!-- License section --> + <string name="library_kau_licenseId" tools:ignore="ResourceName">apache_2_0</string> + <!-- Custom variables section --> +</resources>
\ No newline at end of file diff --git a/core/src/main/res/values/strings_commons.xml b/core/src/main/res/values/strings_commons.xml new file mode 100644 index 0000000..0ca785d --- /dev/null +++ b/core/src/main/res/values/strings_commons.xml @@ -0,0 +1,57 @@ +<!-- +A collection of common string values +Most resources are verbatim and x represents a formatted item +--> + +<resources> + <string name="kau_add_account">Add Account</string> + <string name="kau_amoled" translatable="false">AMOLED</string> + <string name="kau_back">Back</string> + <string name="kau_cancel">Cancel</string> + <string name="kau_changelog">Changelog</string> + <string name="kau_close">Close</string> + <string name="kau_contact_us">Contact Us</string> + <string name="kau_custom">Custom</string> + <string name="kau_dark">Dark</string> + <string name="kau_default">Default</string> + <string name="kau_do_not_show_again">Do not show again</string> + <string name="kau_done">Done</string> + <string name="kau_error">Error</string> + <string name="kau_exit">Exit</string> + <string name="kau_exit_confirmation">Are you sure you want to exit?</string> + <string name="kau_exit_confirmation_x">Are you sure you want to exit %s?</string> + <string name="kau_glass">Glass</string> + <string name="kau_got_it">Got it</string> + <string name="kau_great">Great</string> + <string name="kau_hide">Hide</string> + <string name="kau_light">Light</string> + <string name="kau_login">Login</string> + <string name="kau_logout">Logout</string> + <string name="kau_logout_confirm_as_x">Are you sure you want to log out as %s?</string> + <string name="kau_lorem_ipsum" translatable="false">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</string> + <string name="kau_manage_account">Manage Account</string> + <string name="kau_maybe">Maybe</string> + <string name="kau_menu">Menu</string> + <string name="kau_no">No</string> + <string name="kau_none">None</string> + <string name="kau_ok">@android:string/ok</string> + <string name="kau_one_day">1 day</string> + <string name="kau_one_hour">1 hour</string> + <string name="kau_play_store">Play Store</string> + <string name="kau_rate">Rate</string> + <string name="kau_report_bug">Report A Bug</string> + <string name="kau_send_feedback">Send Feedback</string> + <string name="kau_settings">Settings</string> + <string name="kau_thank_you">Thank You</string> + <string name="kau_uh_oh">Uh Oh</string> + <string name="kau_x_days">%d days</string> + <string name="kau_x_hours">%d hours</string> + <string name="kau_x_minutes">%d minutes</string> + <string name="kau_warning">Warning</string> + <string name="kau_yes">Yes</string> + <string name="kau_search">Search</string> + <string name="kau_no_results_found">No Results Found</string> + <string name="kau_about_app">About App</string> + <string name="kau_send_via">Send via</string> + <string name="kau_about_x">About %s</string> +</resources> diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml new file mode 100644 index 0000000..2067c6d --- /dev/null +++ b/core/src/main/res/values/styles.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="Kau" parent="Theme.AppCompat.NoActionBar" /> + + <style name="Kau.Translucent"> + <item name="android:windowBackground">@color/kau_shadow_overlay</item> + <item name="android:colorBackgroundCacheHint">@null</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:windowIsFloating">false</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowNoTitle">true</item> + <item name="android:windowDrawsSystemBarBackgrounds">true</item> + </style> + + <style name="Kau.Translucent.About"> + <item name="android:windowEnterTransition">@transition/kau_enter_slide_top</item> + <item name="android:windowReturnTransition">@transition/kau_about_return_upwards</item> + </style> + +</resources>
\ No newline at end of file diff --git a/core/src/main/res/values/styles_animations.xml b/core/src/main/res/values/styles_animations.xml new file mode 100644 index 0000000..a991132 --- /dev/null +++ b/core/src/main/res/values/styles_animations.xml @@ -0,0 +1,30 @@ +<resources> + + <style name="KauSlideIn" parent="@android:style/Animation.Activity"> + <item name="android:activityOpenEnterAnimation">@anim/kau_slide_in_right</item> + <item name="android:activityCloseEnterAnimation">@anim/kau_slide_in_right</item> + <item name="android:taskOpenEnterAnimation">@anim/kau_slide_in_right</item> + <item name="android:taskCloseEnterAnimation">@anim/kau_slide_in_right</item> + <item name="android:taskToFrontEnterAnimation">@anim/kau_slide_in_right</item> + <item name="android:windowEnterAnimation">@anim/kau_slide_in_right</item> + </style> + + <style name="KauSlideInSlideOut" parent="@style/KauSlideIn"> + <item name="android:activityOpenExitAnimation">@anim/kau_slide_out_right</item> + <item name="android:activityCloseExitAnimation">@anim/kau_slide_out_right</item> + <item name="android:taskOpenExitAnimation">@anim/kau_slide_out_right</item> + <item name="android:taskCloseExitAnimation">@anim/kau_slide_out_right</item> + <item name="android:taskToFrontExitAnimation">@anim/kau_slide_out_right</item> + <item name="android:windowExitAnimation">@anim/kau_slide_out_right</item> + </style> + + <style name="KauSlideInFadeOut" parent="@style/KauSlideIn"> + <item name="android:activityOpenExitAnimation">@anim/kau_fade_out</item> + <item name="android:activityCloseExitAnimation">@anim/kau_fade_out</item> + <item name="android:taskOpenExitAnimation">@anim/kau_fade_out</item> + <item name="android:taskCloseExitAnimation">@anim/kau_fade_out</item> + <item name="android:taskToFrontExitAnimation">@anim/kau_fade_out</item> + <item name="android:windowExitAnimation">@anim/kau_fade_out</item> + </style> + +</resources> diff --git a/core/src/main/res/xml/kau_changelog.xml b/core/src/main/res/xml/kau_changelog.xml new file mode 100644 index 0000000..e570995 --- /dev/null +++ b/core/src/main/res/xml/kau_changelog.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <!--This is a template--> + + <!-- + <version title="v"/> + <item text="" /> + --> + + <version title="v0.1" /> + <item text="Initial Changelog" /> + <item text="" /> +</resources>
\ No newline at end of file |