Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 9 additions & 61 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion rootProject.compileSdkVersion

defaultConfig {
applicationId "com.omega"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -22,12 +23,8 @@ android {

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
api "com.android.support:appcompat-v7:$supportLibraryVersion"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
api "androidx.appcompat:appcompat:$appCompatLibraryVersion"

api project(":center_icon_button")

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
24 changes: 0 additions & 24 deletions app/src/androidTest/java/com/omega/ExampleInstrumentedTest.kt

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/java/com/omega/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.omega

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

Expand Down
17 changes: 0 additions & 17 deletions app/src/test/java/com/omega/ExampleUnitTest.kt

This file was deleted.

20 changes: 8 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.2.30'
ext.supportLibraryVersion = '27.1.1'
ext.targetSdkVersion = 27
ext.compileSdkVersion = 27
ext.kotlinVersion = '1.2.71'
ext.appCompatLibraryVersion = '1.0.0'
ext.targetSdkVersion = 28
ext.compileSdkVersion = 28
ext.minSdkVersion = 14


repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
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
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

Expand Down
6 changes: 1 addition & 5 deletions center_icon_button/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ android {
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand All @@ -21,10 +18,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly "com.android.support:appcompat-v7:$supportLibraryVersion"
compileOnly "androidx.appcompat:appcompat:$appCompatLibraryVersion"
}
3 changes: 1 addition & 2 deletions center_icon_button/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.omega_r.libs.centericonbutton" />
<manifest package="com.omega_r.libs.centericonbutton" />
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.Nullable;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.widget.AppCompatButton;
import android.text.method.TransformationMethod;
import android.util.AttributeSet;

Expand All @@ -20,6 +15,12 @@
import java.util.List;
import java.util.StringTokenizer;

import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatButton;
import androidx.core.graphics.drawable.DrawableCompat;

public class OmegaCenterIconButton extends AppCompatButton {

private static final String DELIMITERS = "\n";
Expand Down Expand Up @@ -181,11 +182,10 @@ private String divideText() {
return isAllCaps() ? longPart.toUpperCase() : longPart;
}

private boolean isAllCaps() {
public boolean isAllCaps() {
TransformationMethod method = getTransformationMethod();
if(method == null) return false;

return method.getClass().getSimpleName().equals("AllCapsTransformationMethod");
}

}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 20 10:05:09 MSK 2018
#Tue Oct 16 18:21:13 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip