diff options
Diffstat (limited to 'library/src/main/res/layout')
8 files changed, 143 insertions, 148 deletions
diff --git a/library/src/main/res/layout/kau_about_item_library.xml b/library/src/main/res/layout/kau_about_item_library.xml index 0ae4d3c..0129512 100644 --- a/library/src/main/res/layout/kau_about_item_library.xml +++ b/library/src/main/res/layout/kau_about_item_library.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/rippleForegroundListenerView" + android:id="@+id/lib_item_card" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" + android:paddingBottom="8dp" + android:paddingTop="8dp" android:clickable="true" android:foreground="?selectableItemBackground" android:layoutDirection="ltr"> @@ -25,7 +25,7 @@ android:paddingRight="8dp"> <TextView - android:id="@+id/libraryName" + android:id="@+id/lib_item_name" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="5" @@ -37,7 +37,7 @@ tools:text="Library name" /> <TextView - android:id="@+id/libraryCreator" + android:id="@+id/lib_item_author" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="2dp" @@ -46,17 +46,17 @@ android:maxLines="2" android:textSize="@dimen/textSizeSmall_openSource" android:textStyle="normal" - tools:text="Creator" /> + tools:text="Author" /> </LinearLayout> <View - android:id="@+id/libraryDescriptionDivider" + android:id="@+id/lib_item_top_divider" android:layout_width="match_parent" android:layout_height="1px" android:layout_marginTop="4dp" /> <TextView - android:id="@+id/libraryDescription" + android:id="@+id/lib_item_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="20" @@ -66,13 +66,13 @@ tools:text="Description"/> <View - android:id="@+id/libraryBottomDivider" + android:id="@+id/lib_item_bottom_divider" android:layout_width="match_parent" android:layout_height="1px" android:layout_marginTop="4dp" /> <LinearLayout - android:id="@+id/libraryBottomContainer" + android:id="@+id/lib_item_bottom_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" @@ -82,7 +82,7 @@ android:paddingTop="4dp"> <TextView - android:id="@+id/libraryVersion" + android:id="@+id/lib_item_version" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" @@ -93,7 +93,7 @@ tools:text="Version" /> <TextView - android:id="@+id/libraryLicense" + android:id="@+id/lib_item_license" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" diff --git a/library/src/main/res/layout/kau_about_item_main.xml b/library/src/main/res/layout/kau_about_item_main.xml deleted file mode 100644 index 96ba110..0000000 --- a/library/src/main/res/layout/kau_about_item_main.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:clickable="true" - android:background="?selectableItemBackground"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="6dp"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingLeft="8dp" - android:paddingRight="8dp"> - - <TextView - android:id="@+id/title" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="5" - android:ellipsize="end" - android:gravity="start" - android:maxLines="1" - android:textSize="@dimen/textSizeLarge_openSource" - android:textStyle="normal" - tools:text="App name" /> - - <TextView - android:id="@+id/creator" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:layout_weight="2" - android:gravity="end" - android:maxLines="2" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Creator" /> - </LinearLayout> - - <View - android:id="@+id/top_divider" - android:layout_width="match_parent" - android:layout_height="1px" - android:layout_marginTop="4dp" /> - - <TextView - android:id="@+id/description" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:maxLines="20" - android:padding="8dp" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Description"/> - - <View - android:id="@+id/bottom_divider" - android:layout_width="match_parent" - android:layout_height="1px" - android:layout_marginTop="4dp" /> - - <LinearLayout - android:id="@+id/bottom_container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:paddingTop="4dp"> - - <TextView - android:id="@+id/version" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:gravity="start" - android:maxLines="1" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Version" /> - - <TextView - android:id="@+id/license" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:gravity="end" - android:maxLines="1" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="License" /> - </LinearLayout> - </LinearLayout> -</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/library/src/main/res/layout/kau_about_section_libraries.xml b/library/src/main/res/layout/kau_about_section_libraries.xml new file mode 100644 index 0000000..45c271b --- /dev/null +++ b/library/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/library/src/main/res/layout/kau_about_section_main.xml b/library/src/main/res/layout/kau_about_section_main.xml new file mode 100644 index 0000000..32b3f19 --- /dev/null +++ b/library/src/main/res/layout/kau_about_section_main.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView 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:nestedScrollingEnabled="true" + 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.KauCutoutTextView + 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:kau_foregroundColor="?android:colorAccent" + app:kau_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> + +</ScrollView> diff --git a/library/src/main/res/layout/kau_activity_about.xml b/library/src/main/res/layout/kau_activity_about.xml index a42cbe8..a2db0e9 100644 --- a/library/src/main/res/layout/kau_activity_about.xml +++ b/library/src/main/res/layout/kau_activity_about.xml @@ -1,34 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> -<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ca.allanwang.kau.widgets.KauElasticDragDismissFrameLayout + 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/kau_container" + android:id="@+id/about_draggable_frame" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + app:kau_dragDismissDistance="@dimen/kau_drag_dismiss_distance" + app:kau_dragDismissScale="0.95" + tools:context=".about.AboutActivityBase"> - <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"> + <android.support.v4.view.ViewPager + android:id="@+id/about_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" /> - <ca.allanwang.kau.views.KauTextSlider - android:id="@+id/kau_toolbar_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - app:kau_animation_type="slide_vertical" /> + <ca.allanwang.kau.widgets.KauInkPageIndicator + 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:kau_pageIndicatorColor="@color/kau_about_page_indicator_dark" + app:kau_currentPageIndicatorColor="@color/kau_about_page_indicator_dark_selected" /> - </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> +</ca.allanwang.kau.widgets.KauElasticDragDismissFrameLayout> diff --git a/library/src/main/res/layout/kau_activity_kpref.xml b/library/src/main/res/layout/kau_activity_kpref.xml index 2281c45..b3c0f78 100644 --- a/library/src/main/res/layout/kau_activity_kpref.xml +++ b/library/src/main/res/layout/kau_activity_kpref.xml @@ -24,7 +24,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> - <ca.allanwang.kau.views.KauTextSlider + <ca.allanwang.kau.widgets.KauTextSlider android:id="@+id/kau_toolbar_text" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/library/src/main/res/layout/kau_recycler_textslider.xml b/library/src/main/res/layout/kau_recycler_textslider.xml new file mode 100644 index 0000000..f051902 --- /dev/null +++ b/library/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.KauTextSlider + android:id="@+id/kau_toolbar_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + app:kau_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/library/src/main/res/layout/kau_search_view.xml b/library/src/main/res/layout/kau_search_view.xml index 4083f44..cd1c4bd 100644 --- a/library/src/main/res/layout/kau_search_view.xml +++ b/library/src/main/res/layout/kau_search_view.xml @@ -8,7 +8,7 @@ android:id="@+id/search_shadow" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/kau_search_full_shadow" + android:background="@color/kau_shadow_overlay" android:visibility="gone" /> <ca.allanwang.kau.views.KauBoundedCardView |