diff options
Diffstat (limited to 'imagepicker/src/main/res')
-rw-r--r-- | imagepicker/src/main/res/layout/kau_activity_image_picker.xml | 29 | ||||
-rw-r--r-- | imagepicker/src/main/res/layout/kau_iitem_image.xml | 16 | ||||
-rw-r--r-- | imagepicker/src/main/res/values/styles.xml | 8 |
3 files changed, 38 insertions, 15 deletions
diff --git a/imagepicker/src/main/res/layout/kau_activity_image_picker.xml b/imagepicker/src/main/res/layout/kau_activity_image_picker.xml index d3739dd..3c12a84 100644 --- a/imagepicker/src/main/res/layout/kau_activity_image_picker.xml +++ b/imagepicker/src/main/res/layout/kau_activity_image_picker.xml @@ -1,18 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout 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" - android:layout_marginTop="@dimen/kau_drag_dismiss_distance"> + android:id="@+id/kau_draggable" + app:dragDismissDistance="@dimen/kau_drag_dismiss_distance" + app:dragDismissScale="0.95"> - <android.support.v7.widget.Toolbar - android:id="@+id/kau_toolbar" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" /> - - <android.support.v7.widget.RecyclerView - android:id="@+id/kau_recycler" + <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="?attr/actionBarSize" /> + android:layout_marginTop="@dimen/kau_drag_dismiss_distance" + android:orientation="vertical"> + + <android.support.v7.widget.Toolbar + android:id="@+id/kau_toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" /> + + <android.support.v7.widget.RecyclerView + android:id="@+id/kau_recycler" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:colorBackground" /> + + </LinearLayout> </ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout>
\ No newline at end of file diff --git a/imagepicker/src/main/res/layout/kau_iitem_image.xml b/imagepicker/src/main/res/layout/kau_iitem_image.xml index 824ae7b..22cc998 100644 --- a/imagepicker/src/main/res/layout/kau_iitem_image.xml +++ b/imagepicker/src/main/res/layout/kau_iitem_image.xml @@ -1,11 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="80dp" - android:layout_height="80dp"> +<android.support.constraint.ConstraintLayout 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/kau_image" - android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_width="0dp" + android:layout_height="0dp" + android:scaleType="centerCrop" + android:background="#f0f" + app:layout_constraintDimensionRatio="1:1" /> -</FrameLayout>
\ No newline at end of file +</android.support.constraint.ConstraintLayout>
\ No newline at end of file diff --git a/imagepicker/src/main/res/values/styles.xml b/imagepicker/src/main/res/values/styles.xml new file mode 100644 index 0000000..1dc5149 --- /dev/null +++ b/imagepicker/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ +<resources> + + <style name="Kau.Translucent.ImagePicker"> + <item name="android:windowEnterTransition">@transition/kau_enter_slide_bottom</item> + <item name="android:windowReturnTransition">@transition/kau_about_return_downward</item> + </style> + +</resources> |