diff --git a/Ibackdrop/Ibackdrop.iml b/Ibackdrop/Ibackdrop.iml
index 62e8602..61b9d47 100644
--- a/Ibackdrop/Ibackdrop.iml
+++ b/Ibackdrop/Ibackdrop.iml
@@ -23,14 +23,13 @@
-
+
-
@@ -52,16 +51,16 @@
-
+
-
+
-
+
-
+
@@ -72,13 +71,6 @@
-
-
-
-
-
-
-
@@ -86,6 +78,13 @@
+
+
+
+
+
+
+
@@ -109,14 +108,19 @@
+
+
+
+
+
diff --git a/Ibackdrop/src/main/java/com/pedromassango/ibackdrop/Backdrop.kt b/Ibackdrop/src/main/java/com/pedromassango/ibackdrop/Backdrop.kt
index c4914ab..f5bef9a 100644
--- a/Ibackdrop/src/main/java/com/pedromassango/ibackdrop/Backdrop.kt
+++ b/Ibackdrop/src/main/java/com/pedromassango/ibackdrop/Backdrop.kt
@@ -14,17 +14,24 @@ class Backdrop(context: Context, attributeSet: AttributeSet): FrameLayout( conte
private lateinit var toolbar: Toolbar
private var openIcon: Drawable? = ResourcesCompat.getDrawable(resources, R.drawable.ic_drop_open, null)
private var closeIcon: Drawable? = ResourcesCompat.getDrawable(resources, R.drawable.ic_drop_close, null)
+ private var frontLayerBackground: Int = R.drawable.backdrop_background
private lateinit var navIconClickListener: NavigationIconClickListener
- init {
+ init{
val customProperties = context.obtainStyledAttributes(attributeSet, R.styleable.Backdrop)
- val moIcon: Drawable? = customProperties.getDrawable(R.styleable.Backdrop_openIcon)
- val mcIcon: Drawable? = customProperties.getDrawable(R.styleable.Backdrop_closeIcon)
- moIcon?.let { openIcon = moIcon }
- mcIcon?.let { closeIcon = mcIcon }
-
- customProperties.recycle()
+ try {
+ val moIcon: Drawable? = customProperties.getDrawable(R.styleable.Backdrop_openIcon)
+ val mcIcon: Drawable? = customProperties.getDrawable(R.styleable.Backdrop_closeIcon)
+ val mTopRightRadius: Boolean? = customProperties.getBoolean(R.styleable.Backdrop_removeTopRightRadius, false)
+ moIcon?.let { openIcon = moIcon }
+ mcIcon?.let { closeIcon = mcIcon }
+ mTopRightRadius?.let {
+ frontLayerBackground = if (mTopRightRadius) R.drawable.backdrop_background_round_left else R.drawable.backdrop_background
+ }
+ }finally{
+ customProperties.recycle()
+ }
}
/**
@@ -81,7 +88,7 @@ class Backdrop(context: Context, attributeSet: AttributeSet): FrameLayout( conte
throw IllegalArgumentException(" ${this.javaClass.simpleName} Must contain only two child!")
}
- getFrontView().background = ResourcesCompat.getDrawable(resources, R.drawable.backdrop_background, null)
+ getFrontView().background = ResourcesCompat.getDrawable(resources, frontLayerBackground, null)
}
/**
diff --git a/Ibackdrop/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Ibackdrop/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 1f6bb29..0000000
--- a/Ibackdrop/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Ibackdrop/src/main/res/drawable-xxxhdpi/backdrop_background_round_left.xml b/Ibackdrop/src/main/res/drawable-xxxhdpi/backdrop_background_round_left.xml
new file mode 100644
index 0000000..009b0a3
--- /dev/null
+++ b/Ibackdrop/src/main/res/drawable-xxxhdpi/backdrop_background_round_left.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Ibackdrop/src/main/res/values/attrs.xml b/Ibackdrop/src/main/res/values/attrs.xml
index 32a057e..d435dc7 100644
--- a/Ibackdrop/src/main/res/values/attrs.xml
+++ b/Ibackdrop/src/main/res/values/attrs.xml
@@ -4,6 +4,7 @@
+
\ No newline at end of file
diff --git a/app/app.iml b/app/app.iml
index 6172865..42836ec 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -22,14 +22,13 @@
-
+
-
@@ -57,16 +56,16 @@
-
+
-
+
-
+
-
+
@@ -77,13 +76,6 @@
-
-
-
-
-
-
-
@@ -91,6 +83,13 @@
+
+
+
+
+
+
+
@@ -98,13 +97,6 @@
-
-
-
-
-
-
-
@@ -112,21 +104,27 @@
+
+
+
+
+
+
+
-
-
+
diff --git a/app/src/main/res/layout/activity_sample.xml b/app/src/main/res/layout/activity_sample.xml
index a19b990..2e10fa7 100644
--- a/app/src/main/res/layout/activity_sample.xml
+++ b/app/src/main/res/layout/activity_sample.xml
@@ -19,6 +19,7 @@
android:id="@+id/backdrop_view"
app:openIcon="@drawable/ic_drop_open"
app:closeIcon="@drawable/ic_drop_close"
+ app:removeTopRightRadius="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/build.gradle b/build.gradle
index 16d5e98..9e96c21 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.0-alpha01'
+ classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 688dea2..0459fea 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Jul 05 15:57:07 WAT 2018
+#Mon Jul 23 13:40:17 WAT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-rc-1-all.zip
diff --git a/local.properties b/local.properties
index 7ff1528..2dc5a13 100644
--- a/local.properties
+++ b/local.properties
@@ -4,6 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
-#Sat Jul 07 17:06:52 WAT 2018
-ndk.dir=/home/pedromassango/Android/Sdk/ndk-bundle
-sdk.dir=/Users/inokri/Library/Android/sdk
+#Mon Jul 23 13:38:37 WAT 2018
+sdk.dir=/Users/pass/Library/Android/sdk