Skip to content

Commit

Permalink
Merge pull request Tapadoo#175 from Tapadoo/issue-fixes
Browse files Browse the repository at this point in the history
Issue fixes
  • Loading branch information
kpmmmurphy authored Feb 28, 2019
2 parents 668357b + 00a09e7 commit b2ef7f8
Show file tree
Hide file tree
Showing 51 changed files with 147 additions and 273 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## 4.0.0 - 2/12/218
## 4.0.1 - 27/2/2019
* Bug Fixes - Removed Unneeded LinearLayoutCompat

## 4.0.0 - 2/12/2018
* Migrate to AndroidX
* Added support for Cutout/Notch

Expand Down
44 changes: 22 additions & 22 deletions alerter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ apply plugin: 'org.jetbrains.dokka'
apply from: rootProject.file('quality.gradle')

final String GROUP_ID = "com.tapadoo.android"
final String VERSION = "4.0.0"
final String DESCRIPTION = "An Android Alerting Library"
final String GITHUB_URL = "https://github.com/Tapadoo/Alerter"
final String VERSION = "4.0.1"
final String DESCRIPTION = "An Android Alerting Library"
final String GITHUB_URL = "https://github.com/Tapadoo/Alerter"

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion

versionCode 1
Expand All @@ -45,24 +45,24 @@ android {
//BinTray configuration - credentials stored in user's gradle.properties
bintray {
user = getBinTrayUser()
key = getBinTrayKey()
key = getBinTrayKey()

publications = ['Alerter']

pkg {
repo = 'maven'
name = project.getName()
desc = DESCRIPTION
vcsUrl = GITHUB_URL + '.git'
websiteUrl = GITHUB_URL
repo = 'maven'
name = project.getName()
desc = DESCRIPTION
vcsUrl = GITHUB_URL + '.git'
websiteUrl = GITHUB_URL
issueTrackerUrl = GITHUB_URL + '/issues'
licenses = ['MIT']
publish = true
licenses = ['MIT']
publish = true

version {
name = VERSION // Version name i.e. "1.0"
desc = DESCRIPTION
vcsTag = VERSION
name = VERSION // Version name i.e. "1.0"
desc = DESCRIPTION
vcsTag = VERSION
released = new Date()
}
}
Expand Down Expand Up @@ -121,18 +121,18 @@ configurations {

dependencies {
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "androidx.annotation:annotation:1.0.0"
implementation "androidx.annotation:annotation:1.0.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// Local Unit Tests - in src/test
testImplementation 'junit:junit:4.12'

// Instrumentation Tests - in src/androidTest
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:rules:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
}

Expand All @@ -152,11 +152,11 @@ bintrayUpload.dependsOn 'dokka'

def final getBinTrayUser() {
final String BINTRAY_USER = "BINTRAY_USER"
return project.hasProperty(BINTRAY_USER)? project.getProperty(BINTRAY_USER) : null
return project.hasProperty(BINTRAY_USER) ? project.getProperty(BINTRAY_USER) : null
}

def final getBinTrayKey() {
final String BINTRAY_KEY = "BINTRAY_KEY"
return project.hasProperty(BINTRAY_KEY)? project.getProperty(BINTRAY_KEY) : null
final String BINTRAY_KEY = "BINTRAY_KEY"
return project.hasProperty(BINTRAY_KEY) ? project.getProperty(BINTRAY_KEY) : null
}

17 changes: 5 additions & 12 deletions alerter/src/main/java/com/tapadoo/alerter/Alert.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import android.widget.Button
import android.widget.FrameLayout
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.alerter_alert_view.view.*
import android.view.DisplayCutout
import androidx.core.view.DisplayCutoutCompat


/**
* Custom Alert View
Expand Down Expand Up @@ -71,12 +68,12 @@ class Alert @JvmOverloads constructor(context: Context, attrs: AttributeSet? = n
var contentGravity: Int
get() = (llAlertBackground?.layoutParams as FrameLayout.LayoutParams).gravity
set(contentGravity) {
val paramsTitle = tvTitle?.layoutParams as LinearLayout.LayoutParams
paramsTitle.gravity = contentGravity
val paramsTitle = tvTitle?.layoutParams as? LinearLayout.LayoutParams
paramsTitle?.gravity = contentGravity
tvTitle?.layoutParams = paramsTitle

val paramsText = tvText?.layoutParams as LinearLayout.LayoutParams
paramsText.gravity = contentGravity
val paramsText = tvText?.layoutParams as? LinearLayout.LayoutParams
paramsText?.gravity = contentGravity
tvText?.layoutParams = paramsText
}

Expand Down Expand Up @@ -239,22 +236,18 @@ class Alert @JvmOverloads constructor(context: Context, attrs: AttributeSet? = n
postDelayed(object : Runnable {
override fun run() {
try {
if (parent == null) {
Log.e(javaClass.simpleName, "getParent() returning Null")
} else {
if (parent != null) {
try {
(parent as ViewGroup).removeView(this@Alert)

onHideListener?.onHide()
} catch (ex: Exception) {
Log.e(javaClass.simpleName, "Cannot remove from parent layout")
}

}
} catch (ex: Exception) {
Log.e(javaClass.simpleName, Log.getStackTraceString(ex))
}

}
}, CLEAN_UP_DELAY_MILLIS.toLong())
}
Expand Down
21 changes: 11 additions & 10 deletions alerter/src/main/res/layout/alerter_alert_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:background="@android:color/transparent"
android:clickable="false">

<androidx.appcompat.widget.LinearLayoutCompat
<LinearLayout
android:id="@+id/llAlertBackground"
style="@style/AlertStyle"
android:background="@android:color/darker_gray"
Expand All @@ -23,8 +23,8 @@
android:paddingBottom="@dimen/alerter_padding_default"
tools:visibility="visible">

<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false">

Expand Down Expand Up @@ -54,11 +54,10 @@
android:visibility="invisible"
tools:visibility="visible" />


</FrameLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
Expand All @@ -71,6 +70,7 @@
android:layout_marginEnd="@dimen/alerter_padding_half"
android:paddingStart="@dimen/alerter_padding_small"
android:paddingLeft="@dimen/alerter_padding_small"
android:paddingEnd="@dimen/alerter_padding_small"
android:textAppearance="@style/AlertTextAppearance.Title"
android:visibility="gone"
tools:text="Title"
Expand All @@ -85,6 +85,7 @@
android:paddingStart="@dimen/alerter_padding_small"
android:paddingLeft="@dimen/alerter_padding_small"
android:paddingTop="@dimen/alerter_padding_small"
android:paddingEnd="@dimen/alerter_padding_small"
android:paddingBottom="@dimen/alerter_padding_small"
android:textAppearance="@style/AlertTextAppearance.Text"
android:visibility="gone"
Expand All @@ -93,15 +94,15 @@

</LinearLayout>

</androidx.appcompat.widget.LinearLayoutCompat>

</LinearLayout>

<androidx.appcompat.widget.LinearLayoutCompat
<LinearLayout
android:id="@+id/llButtonContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end" />
android:gravity="end"
android:orientation="horizontal" />

</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>

</FrameLayout>
1 change: 0 additions & 1 deletion app-base/.gitignore

This file was deleted.

60 changes: 0 additions & 60 deletions app-base/build.gradle

This file was deleted.

17 changes: 0 additions & 17 deletions app-base/proguard-rules.pro

This file was deleted.

65 changes: 0 additions & 65 deletions app-base/src/main/AndroidManifest.xml

This file was deleted.

1 change: 0 additions & 1 deletion app-instant/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions app-instant/build.gradle

This file was deleted.

Loading

0 comments on commit b2ef7f8

Please sign in to comment.