diff options
Diffstat (limited to 'mediapicker/src/main/res')
9 files changed, 178 insertions, 0 deletions
diff --git a/mediapicker/src/main/res/layout-v21/kau_activity_image_picker_overlay.xml b/mediapicker/src/main/res/layout-v21/kau_activity_image_picker_overlay.xml new file mode 100644 index 0000000..a0ce301 --- /dev/null +++ b/mediapicker/src/main/res/layout-v21/kau_activity_image_picker_overlay.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_draggable" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:dragDismissDistance="@dimen/kau_drag_dismiss_distance_large" + app:dragDismissScale="0.95"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/kau_recyclerview" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginTop="@dimen/kau_drag_dismiss_distance" + android:background="?android:colorBackground" /> + +</ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout>
\ No newline at end of file diff --git a/mediapicker/src/main/res/layout/kau_activity_image_picker.xml b/mediapicker/src/main/res/layout/kau_activity_image_picker.xml new file mode 100644 index 0000000..6d991b0 --- /dev/null +++ b/mediapicker/src/main/res/layout/kau_activity_image_picker.xml @@ -0,0 +1,55 @@ +<?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" + android:id="@+id/kau_coordinator" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:colorBackground" + android:fitsSystemWindows="true"> + + <android.support.design.widget.AppBarLayout + android:id="@+id/kau_appbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> + + <android.support.v7.widget.Toolbar + android:id="@+id/kau_toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:layout_scrollFlags="scroll|enterAlways" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> + + <TextView + android:id="@+id/kau_selection_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end" + android:drawablePadding="@dimen/kau_padding_small" + android:gravity="center_vertical" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingStart="@dimen/kau_padding_normal" + android:text="@string/kau_0" /> + + </android.support.v7.widget.Toolbar> + + </android.support.design.widget.AppBarLayout> + + <android.support.v7.widget.RecyclerView + android:id="@+id/kau_recyclerview" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + + <android.support.design.widget.FloatingActionButton + android:id="@+id/kau_fab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/kau_fab_margin" + android:clickable="true" + app:backgroundTint="?colorAccent" + app:layout_anchor="@id/kau_recyclerview" + app:layout_anchorGravity="bottom|right|end" /> + + +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/mediapicker/src/main/res/layout/kau_blurred_imageview.xml b/mediapicker/src/main/res/layout/kau_blurred_imageview.xml new file mode 100644 index 0000000..e28cb9a --- /dev/null +++ b/mediapicker/src/main/res/layout/kau_blurred_imageview.xml @@ -0,0 +1,32 @@ +<?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"> + + <ImageView + android:id="@+id/image_base" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:contentDescription="@string/kau_blurrable_imageview" + android:scaleType="centerCrop" /> + + <ImageView + android:id="@+id/image_blur" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:alpha="0" + android:contentDescription="@string/kau_blurrable_imageview" + android:scaleType="centerCrop" /> + + <ImageView + android:id="@+id/image_foreground" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" + android:alpha="0" + android:background="@color/kau_blurred_image_selection_overlay" + android:contentDescription="@string/kau_blurrable_imageview" + android:scaleType="centerInside" /> + +</merge>
\ No newline at end of file diff --git a/mediapicker/src/main/res/layout/kau_iitem_image.xml b/mediapicker/src/main/res/layout/kau_iitem_image.xml new file mode 100644 index 0000000..9d51d77 --- /dev/null +++ b/mediapicker/src/main/res/layout/kau_iitem_image.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<ca.allanwang.kau.imagepicker.BlurredImageView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_image" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="2dp" + android:foreground="@drawable/kau_selectable_white" + app:relativeHeight="1" />
\ No newline at end of file diff --git a/mediapicker/src/main/res/layout/kau_iitem_image_basic.xml b/mediapicker/src/main/res/layout/kau_iitem_image_basic.xml new file mode 100644 index 0000000..b89e41d --- /dev/null +++ b/mediapicker/src/main/res/layout/kau_iitem_image_basic.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<ca.allanwang.kau.ui.views.MeasuredImageView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_image" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="2dp" + android:foreground="@drawable/kau_selectable_white" + android:scaleType="centerCrop" + app:relativeHeight="1" />
\ No newline at end of file diff --git a/mediapicker/src/main/res/transition-v21/kau_image_enter.xml b/mediapicker/src/main/res/transition-v21/kau_image_enter.xml new file mode 100644 index 0000000..447c0c9 --- /dev/null +++ b/mediapicker/src/main/res/transition-v21/kau_image_enter.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:interpolator/fast_out_linear_in" + android:transitionOrdering="together"> + + <slide + android:duration="400" + android:slideEdge="bottom"> + <targets android:targetId="@id/kau_draggable" /> + </slide> + + <fade + android:duration="200" + android:startDelay="200" /> + +</transitionSet> diff --git a/mediapicker/src/main/res/transition-v21/kau_image_exit_bottom.xml b/mediapicker/src/main/res/transition-v21/kau_image_exit_bottom.xml new file mode 100644 index 0000000..447c0c9 --- /dev/null +++ b/mediapicker/src/main/res/transition-v21/kau_image_exit_bottom.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:interpolator/fast_out_linear_in" + android:transitionOrdering="together"> + + <slide + android:duration="400" + android:slideEdge="bottom"> + <targets android:targetId="@id/kau_draggable" /> + </slide> + + <fade + android:duration="200" + android:startDelay="200" /> + +</transitionSet> diff --git a/mediapicker/src/main/res/transition-v21/kau_image_exit_top.xml b/mediapicker/src/main/res/transition-v21/kau_image_exit_top.xml new file mode 100644 index 0000000..8d64f48 --- /dev/null +++ b/mediapicker/src/main/res/transition-v21/kau_image_exit_top.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:interpolator/fast_out_linear_in" + android:transitionOrdering="together"> + + <slide + android:duration="400" + android:slideEdge="top"> + <targets android:targetId="@id/kau_draggable" /> + </slide> + + <fade + android:duration="200" + android:startDelay="200" /> + +</transitionSet> diff --git a/mediapicker/src/main/res/values/strings.xml b/mediapicker/src/main/res/values/strings.xml new file mode 100644 index 0000000..39ab16b --- /dev/null +++ b/mediapicker/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="kau_no_items_found">No items found</string> + <string name="kau_no_items_selected">No items have been selected</string> + <string name="kau_blurrable_imageview">Blurrable ImageView</string> + <string name="kau_no_items_loaded">No items loaded</string> +</resources>
\ No newline at end of file |