Skip to content

Commit

Permalink
Merging
Browse files Browse the repository at this point in the history
  • Loading branch information
kpmmmurphy committed Jan 26, 2018
2 parents 1049fe7 + 7b6cf9f commit c7f38ed
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ obj/
libs/

#Signing Keys
/keystore
keystore
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## 2.0.4 - 26/1/2018
* Fixed content gravity issue

## 2.0.3 - 08/1/2018
* Updated build tools & support libs
* Added methods to set icon tint
Expand Down
2 changes: 1 addition & 1 deletion alerter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: "maven-publish"
apply from: rootProject.file('quality.gradle')

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

Expand Down
26 changes: 17 additions & 9 deletions alerter/src/main/java/com/tapadoo/alerter/Alert.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;

Expand Down Expand Up @@ -125,13 +126,13 @@ private void initView() {

ViewCompat.setTranslationZ(this, Integer.MAX_VALUE);

flBackground = (FrameLayout) findViewById(R.id.flAlertBackground);
flClickShield = (FrameLayout) findViewById(R.id.flClickShield);
ivIcon = (ImageView) findViewById(R.id.ivIcon);
tvTitle = (TextView) findViewById(R.id.tvTitle);
tvText = (TextView) findViewById(R.id.tvText);
rlContainer = (ViewGroup) findViewById(R.id.rlContainer);
pbProgress = (ProgressBar) findViewById(R.id.pbProgress);
flBackground = findViewById(R.id.flAlertBackground);
flClickShield = findViewById(R.id.flClickShield);
ivIcon = findViewById(R.id.ivIcon);
tvTitle = findViewById(R.id.tvTitle);
tvText = findViewById(R.id.tvText);
rlContainer = findViewById(R.id.rlContainer);
pbProgress = findViewById(R.id.pbProgress);

flBackground.setOnClickListener(this);

Expand Down Expand Up @@ -377,8 +378,15 @@ public int getContentGravity() {
* @param contentGravity Gravity of the Alert
*/
public void setContentGravity(final int contentGravity) {
((LayoutParams) rlContainer.getLayoutParams()).gravity = contentGravity;
rlContainer.requestLayout();
final LinearLayout.LayoutParams paramsTitle
= (LinearLayout.LayoutParams) tvTitle.getLayoutParams();
paramsTitle.gravity = contentGravity;
tvTitle.setLayoutParams(paramsTitle);

final LinearLayout.LayoutParams paramsText
= (LinearLayout.LayoutParams) tvText.getLayoutParams();
paramsText.gravity = contentGravity;
tvText.setLayoutParams(paramsText);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ ext {
minSdkVersion = 14
targetSdkVersion = 27

keystoreProperties = '../keystore/release.properties'

buildToolsVersion = '27.0.2'

sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_8

supportLibVersion = '27.0.2'

keystoreProperties = '../keystore/release.properties'

libs = [
android_gradle : 'com.android.tools.build:gradle:2.2.3',

Expand Down

0 comments on commit c7f38ed

Please sign in to comment.