Skip to content

Commit

Permalink
完善demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lygttpod committed Oct 10, 2019
1 parent 573a7a5 commit 9c918a3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
android:id="@+id/super_shape"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ShapeBuilder"
android:text="Shape&Shadow"
android:textAllCaps="false" />

<Button
Expand Down
16 changes: 15 additions & 1 deletion app/src/main/res/layout/activity_shadow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@
android:orientation="vertical"
android:padding="20dp">

<TextView
android:id="@+id/tv_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="注意:阴影部分占布局大小"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.allen.library.shape.ShapeFrameLayout
android:id="@+id/shape_view"
android:layout_width="300dp"
android:layout_height="100dp"
android:layout_marginTop="20dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_tip"
app:shadowBottomWidth="0dp"
app:shadowColor="@color/colorAccent"
app:shadowCornersRadius="0dp"
Expand Down Expand Up @@ -64,6 +74,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:max="50"
app:layout_constraintBottom_toBottomOf="@+id/shadow_padding_left_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/shadow_padding_left_tv"
Expand All @@ -83,6 +94,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:max="50"
app:layout_constraintBottom_toBottomOf="@+id/shadow_padding_top_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/shadow_padding_top_tv"
Expand All @@ -102,6 +114,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:max="50"
app:layout_constraintBottom_toBottomOf="@+id/shadow_padding_right_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/shadow_padding_right_tv"
Expand All @@ -121,6 +134,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:max="50"
app:layout_constraintBottom_toBottomOf="@+id/shadow_padding_bottom_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/shadow_padding_bottom_tv"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:layout_margin="5dp"
shape:shadowBottomWidth="5dp"
shape:shadowColor="@color/colorAccent"
shape:shadowColorAlpha="0.2"
shape:shadowCornersRadius="9dp"
shape:shadowLeftWidth="5dp"
shape:shadowRightWidth="3dp"
Expand Down

0 comments on commit 9c918a3

Please sign in to comment.