Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GIGAMOLE committed Apr 25, 2016
1 parent c281539 commit e6bc3e8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 28 deletions.
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.gigamole.shadowlayout"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest
package="com.gigamole.shadowlayout"
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/drawable/bg_fill.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="rectangle">
android:dither="true"
android:shape="rectangle">

<solid android:color="#EEE5E9"/>
<stroke android:color="#000" android:width="2dp"/>
<corners android:radius="10dp" />
<stroke
android:width="2dp"
android:color="#000"/>
<corners android:radius="10dp"/>

</shape>
10 changes: 6 additions & 4 deletions app/src/main/res/drawable/bg_stroke.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="rectangle">
android:dither="true"
android:shape="rectangle">

<solid android:color="#00000000"/>
<stroke android:color="#EEE5E9" android:width="2dp"/>
<corners android:radius="10dp" />
<stroke
android:width="2dp"
android:color="#EEE5E9"/>
<corners android:radius="10dp"/>

</shape>
20 changes: 10 additions & 10 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="*ShadowLayout*"
android:textColor="#EEE5E9"
android:textSize="40sp"/>
Expand All @@ -108,13 +108,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:background="@drawable/bg_fill"
android:textStyle="bold"
android:gravity="center"
android:padding="10dp"
android:text="@string/app_name"
android:textColor="#D64933"
android:textSize="30sp"/>
android:textSize="30sp"
android:textStyle="bold"/>

<ImageView
android:layout_width="40dp"
Expand Down Expand Up @@ -159,8 +159,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center">
android:gravity="center"
android:orientation="horizontal">

<ImageView
android:layout_width="100dp"
Expand All @@ -175,21 +175,21 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginStart="30dp"
android:gravity="center"
android:text="SL"
android:textStyle="bold"
android:textColor="#EEE5E9"
android:textSize="40sp"/>
android:textSize="40sp"
android:textStyle="bold"/>

<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:background="@drawable/bg_stroke"
android:layout_marginLeft="30dp"
android:layout_marginStart="30dp"
android:background="@drawable/bg_stroke"
android:padding="20dp"
android:src="@drawable/ic_seventh"
android:tint="#EEE5E9"/>
Expand Down
13 changes: 5 additions & 8 deletions library/src/main/java/com/gigamole/library/ShadowLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,18 @@ public class ShadowLayout extends FrameLayout {
private final static float MAX_ANGLE = 360.0f;
private final static float MIN_RADIUS = 0.1f;
private final static float MIN_ANGLE = 0.0f;

// Shadow bitmap and canvas
private Bitmap mBitmap;
private Canvas mCanvas = new Canvas();

// View bounds
private Rect mBounds = new Rect();
// Shadow paint
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG) {
{
setDither(true);
setFilterBitmap(true);
}
};

// Shadow bitmap and canvas
private Bitmap mBitmap;
private Canvas mCanvas = new Canvas();
// View bounds
private Rect mBounds = new Rect();
// Check whether need to redraw shadow
private boolean mInvalidateShadow = true;

Expand Down

0 comments on commit e6bc3e8

Please sign in to comment.