Skip to content

Commit e6bc3e8

Browse files
committed
Release 1.0.0
1 parent c281539 commit e6bc3e8

File tree

5 files changed

+30
-28
lines changed

5 files changed

+30
-28
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.gigamole.shadowlayout"
3-
xmlns:android="http://schemas.android.com/apk/res/android">
2+
<manifest
3+
package="com.gigamole.shadowlayout"
4+
xmlns:android="http://schemas.android.com/apk/res/android">
45

56
<application
67
android:allowBackup="true"
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:dither="true"
4-
android:shape="rectangle">
3+
android:dither="true"
4+
android:shape="rectangle">
55

66
<solid android:color="#EEE5E9"/>
7-
<stroke android:color="#000" android:width="2dp"/>
8-
<corners android:radius="10dp" />
7+
<stroke
8+
android:width="2dp"
9+
android:color="#000"/>
10+
<corners android:radius="10dp"/>
911

1012
</shape>
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:dither="true"
4-
android:shape="rectangle">
3+
android:dither="true"
4+
android:shape="rectangle">
55

66
<solid android:color="#00000000"/>
7-
<stroke android:color="#EEE5E9" android:width="2dp"/>
8-
<corners android:radius="10dp" />
7+
<stroke
8+
android:width="2dp"
9+
android:color="#EEE5E9"/>
10+
<corners android:radius="10dp"/>
911

1012
</shape>

app/src/main/res/layout/activity_main.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
android:layout_width="match_parent"
8181
android:layout_height="wrap_content"
8282
android:layout_gravity="center"
83-
android:gravity="center"
8483
android:layout_marginTop="10dp"
84+
android:gravity="center"
8585
android:text="*ShadowLayout*"
8686
android:textColor="#EEE5E9"
8787
android:textSize="40sp"/>
@@ -108,13 +108,13 @@
108108
android:layout_width="wrap_content"
109109
android:layout_height="wrap_content"
110110
android:layout_gravity="center"
111-
android:gravity="center"
112111
android:background="@drawable/bg_fill"
113-
android:textStyle="bold"
112+
android:gravity="center"
114113
android:padding="10dp"
115114
android:text="@string/app_name"
116115
android:textColor="#D64933"
117-
android:textSize="30sp"/>
116+
android:textSize="30sp"
117+
android:textStyle="bold"/>
118118

119119
<ImageView
120120
android:layout_width="40dp"
@@ -159,8 +159,8 @@
159159
<LinearLayout
160160
android:layout_width="match_parent"
161161
android:layout_height="match_parent"
162-
android:orientation="horizontal"
163-
android:gravity="center">
162+
android:gravity="center"
163+
android:orientation="horizontal">
164164

165165
<ImageView
166166
android:layout_width="100dp"
@@ -175,21 +175,21 @@
175175
android:layout_width="wrap_content"
176176
android:layout_height="wrap_content"
177177
android:layout_gravity="center"
178-
android:gravity="center"
179178
android:layout_marginLeft="30dp"
180179
android:layout_marginStart="30dp"
180+
android:gravity="center"
181181
android:text="SL"
182-
android:textStyle="bold"
183182
android:textColor="#EEE5E9"
184-
android:textSize="40sp"/>
183+
android:textSize="40sp"
184+
android:textStyle="bold"/>
185185

186186
<ImageView
187187
android:layout_width="100dp"
188188
android:layout_height="100dp"
189189
android:layout_gravity="center"
190-
android:background="@drawable/bg_stroke"
191190
android:layout_marginLeft="30dp"
192191
android:layout_marginStart="30dp"
192+
android:background="@drawable/bg_stroke"
193193
android:padding="20dp"
194194
android:src="@drawable/ic_seventh"
195195
android:tint="#EEE5E9"/>

library/src/main/java/com/gigamole/library/ShadowLayout.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,18 @@ public class ShadowLayout extends FrameLayout {
4343
private final static float MAX_ANGLE = 360.0f;
4444
private final static float MIN_RADIUS = 0.1f;
4545
private final static float MIN_ANGLE = 0.0f;
46-
47-
// Shadow bitmap and canvas
48-
private Bitmap mBitmap;
49-
private Canvas mCanvas = new Canvas();
50-
51-
// View bounds
52-
private Rect mBounds = new Rect();
5346
// Shadow paint
5447
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG) {
5548
{
5649
setDither(true);
5750
setFilterBitmap(true);
5851
}
5952
};
60-
53+
// Shadow bitmap and canvas
54+
private Bitmap mBitmap;
55+
private Canvas mCanvas = new Canvas();
56+
// View bounds
57+
private Rect mBounds = new Rect();
6158
// Check whether need to redraw shadow
6259
private boolean mInvalidateShadow = true;
6360

0 commit comments

Comments
 (0)