Skip to content

Commit

Permalink
fix layout_gravity error
Browse files Browse the repository at this point in the history
  • Loading branch information
ToDou committed Sep 22, 2017
1 parent 2f9791f commit dcdc094
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Installation
====
```groovy
dependencies {
compile 'com.loopeer.lib:shadow:0.0.1'
compile 'com.loopeer.lib:shadow:0.0.3'
}
```
Usages
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {
implementation libs.constraintLayout
implementation libs.design
implementation libs.flexbox
// implementation 'com.loopeer.lib:shadow:0.0.2'
implementation project(':shadow')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_shadow_view_demo2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<com.loopeer.shadow.ShadowView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="200dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
Expand All @@ -34,6 +34,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_gravity="center"
android:text="This library draw android view shadow by ShadowLayer. You may don't like the CardView's black shadow which we can't change it's color."
android:textStyle="bold"/>
</com.loopeer.shadow.ShadowView>
Expand Down
2 changes: 1 addition & 1 deletion shadow/bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'

version = "0.0.1"
version = "0.0.3"

uploadArchives {
repositories {
Expand Down
31 changes: 30 additions & 1 deletion shadow/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,35 @@
<attr name="backgroundColor" format="color"/>
</declare-styleable>
<declare-styleable name="ShadowView_Layout">
<attr name="layout_gravity" />
<attr name="layout_gravity">
<flag name="top"
value="0x30"/>
<flag name="bottom"
value="0x50"/>
<flag name="left"
value="0x03"/>
<flag name="right"
value="0x05"/>
<flag name="center_vertical"
value="0x10"/>
<flag name="fill_vertical"
value="0x70"/>
<flag name="center_horizontal"
value="0x01"/>
<flag name="fill_horizontal"
value="0x07"/>
<flag name="center"
value="0x11"/>
<flag name="fill"
value="0x77"/>
<flag name="clip_vertical"
value="0x80"/>
<flag name="clip_horizontal"
value="0x08"/>
<flag name="start"
value="0x00800003"/>
<flag name="end"
value="0x00800005"/>
</attr>
</declare-styleable>
</resources>

0 comments on commit dcdc094

Please sign in to comment.