Skip to content
This repository was archived by the owner on Jun 10, 2023. It is now read-only.

Commit 2dcf871

Browse files
committed
Added PlusProgressDialog - Better Performance - Fixed Bugs
1 parent d38ccbf commit 2dcf871

File tree

18 files changed

+421
-31
lines changed

18 files changed

+421
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Just a simple library for Android that provides setting custom font on Textview
99
```groovy
1010
dependencies {
1111
...
12-
compile 'phelat.textview:textviewplus:1.2.2'
12+
compile 'phelat.textview:textviewplus:1.4.0'
1313
}
1414
```
1515
### Maven
1616
```xml
1717
<dependency>
1818
<groupId>phelat.textview</groupId>
1919
<artifactId>textviewplus</artifactId>
20-
<version>1.2.2</version>
20+
<version>1.4.0</version>
2121
<type>pom</type>
2222
</dependency>
2323
```

app/src/main/java/phelat/TextView/Sample/MainActivity.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
import android.os.Bundle;
44
import android.support.v7.app.AppCompatActivity;
5+
import android.view.View;
56

6-
import phelat.TextView.Plus;
7+
import phelat.widget.PlusButton;
8+
import phelat.widget.PlusProgressDialog;
9+
import phelat.widget.PlusTextView;
710

811
/**
912
*
@@ -18,9 +21,21 @@ public class MainActivity extends AppCompatActivity {
1821
super.onCreate(savedInstanceState);
1922
setContentView(R.layout.main);
2023

21-
Plus myTextView = (Plus) findViewById(R.id.myTextView);
24+
PlusTextView myTextView = (PlusTextView) findViewById(R.id.myTextView);
2225
myTextView.setFont("Roboto-LightItalic.ttf");
2326

27+
PlusButton progressButton = (PlusButton) findViewById(R.id.progressButton);
28+
progressButton.setOnClickListener(new View.OnClickListener() {
29+
@Override
30+
public void onClick(View v) {
31+
PlusProgressDialog plusProgressDialog = new PlusProgressDialog(MainActivity.this);
32+
plusProgressDialog.setProgressMessage("Please Wait...");
33+
plusProgressDialog.setFont("Roboto-LightItalic.ttf");
34+
plusProgressDialog.setCancelable(true);
35+
plusProgressDialog.show();
36+
}
37+
});
38+
2439
}
2540

2641
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package phelat.TextView.Sample;
2+
3+
import android.app.Application;
4+
5+
import phelat.utils.Plus;
6+
7+
/**
8+
* Created by phelat on 4/5/17.
9+
* Project : TextViewPlus.
10+
*/
11+
12+
public class MyApplication extends Application {
13+
14+
@Override
15+
public void onCreate(){
16+
super.onCreate();
17+
}
18+
19+
@Override
20+
public void onTerminate(){
21+
super.onTerminate();
22+
23+
Plus.unleash();
24+
25+
}
26+
27+
}

app/src/main/res/layout/main.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
android:layout_height="match_parent"
1111
android:orientation="vertical">
1212

13-
<phelat.TextView.Plus
13+
<phelat.widget.PlusTextView
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
1616
android:text="Hello World!"
1717
android:gravity="center"
1818
android:textSize="50sp"
1919
app:font="Roboto-LightItalic.ttf"/>
2020

21-
<phelat.TextView.Plus
21+
<phelat.widget.PlusTextView
2222
android:layout_width="match_parent"
2323
android:layout_height="wrap_content"
2424
android:text="Hello World!"
@@ -27,7 +27,7 @@
2727
app:font="Roboto-Black.ttf"
2828
android:layout_marginTop="10dp" />
2929

30-
<phelat.TextView.Plus
30+
<phelat.widget.PlusTextView
3131
android:layout_width="match_parent"
3232
android:layout_height="wrap_content"
3333
android:text="Hello World!"
@@ -42,48 +42,49 @@
4242
android:orientation="horizontal"
4343
android:layout_marginTop="10dp">
4444

45-
<phelat.Button.Plus
45+
<phelat.widget.PlusButton
4646
android:layout_width="match_parent"
4747
android:layout_height="match_parent"
4848
android:layout_weight="1"
4949
app:font="Roboto-Black.ttf"
50-
android:text="BOLD"/>
50+
android:text="Progress"
51+
android:id="@+id/progressButton"/>
5152

52-
<phelat.Button.Plus
53+
<phelat.widget.PlusButton
5354
android:layout_width="match_parent"
5455
android:layout_height="match_parent"
5556
android:layout_weight="1"
5657
app:font="Roboto-LightItalic.ttf"
5758
android:text="Light Italic"/>
5859

59-
<phelat.Button.Plus
60+
<phelat.widget.PlusButton
6061
android:layout_width="match_parent"
6162
android:layout_height="match_parent"
6263
android:layout_weight="1"
6364
android:text="Normal"/>
6465

6566
</LinearLayout>
6667

67-
<phelat.EditText.Plus
68+
<phelat.widget.PlusEditText
6869
android:layout_width="match_parent"
6970
android:layout_height="wrap_content"
7071
app:font="Roboto-LightItalic.ttf"
7172
android:hint="Light Italic" />
7273

73-
<phelat.EditText.Plus
74+
<phelat.widget.PlusEditText
7475
android:layout_width="match_parent"
7576
android:layout_height="wrap_content"
7677
app:font="Roboto-Black.ttf"
7778
android:hint="Bold" />
7879

79-
<phelat.CheckBox.Plus
80+
<phelat.widget.PlusCheckBox
8081
android:layout_width="match_parent"
8182
android:layout_height="match_parent"
8283
android:text="Coffee"
8384
app:font="Roboto-Black.ttf"
8485
android:textSize="19sp"/>
8586

86-
<phelat.CheckBox.Plus
87+
<phelat.widget.PlusCheckBox
8788
android:layout_width="match_parent"
8889
android:layout_height="match_parent"
8990
android:text="Tea"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.0'
8+
classpath 'com.android.tools.build:gradle:2.3.1'
99
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1111

textviewplus/bintray.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.jfrog.bintray'
22

3-
version = '1.3.0'
3+
version = '1.4.0'
44

55
task sourcesJar(type: Jar) {
66
from android.sourceSets.main.java.srcDirs

textviewplus/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 15
99
targetSdkVersion 25
10-
versionCode 4
11-
versionName "1.3.0"
10+
versionCode 5
11+
versionName "1.4.0"
1212

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

textviewplus/src/main/java/phelat/Button/Plus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import android.util.Log;
99

1010
import phelat.TextView.R;
11-
import phelat.Utils.FontHelper;
1211

12+
@Deprecated
1313
public class Plus extends AppCompatButton {
1414

1515
private static final String TAG = "TextViewPlus";
@@ -44,7 +44,7 @@ public boolean setFont(String asset) {
4444

4545
try {
4646

47-
typeface = FontHelper.get(getContext(), asset);
47+
typeface = phelat.utils.Plus.get(getContext(), asset);
4848

4949
} catch (Exception e) {
5050

textviewplus/src/main/java/phelat/CheckBox/Plus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import android.util.Log;
99

1010
import phelat.TextView.R;
11-
import phelat.Utils.FontHelper;
1211

12+
@Deprecated
1313
public class Plus extends AppCompatCheckBox {
1414

1515
private static final String TAG = "TextViewPlus";
@@ -44,7 +44,7 @@ public boolean setFont(String asset) {
4444

4545
try {
4646

47-
typeface = FontHelper.get(getContext(), asset);
47+
typeface = phelat.utils.Plus.get(getContext(), asset);
4848

4949
} catch (Exception e) {
5050

textviewplus/src/main/java/phelat/EditText/Plus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import android.util.Log;
99

1010
import phelat.TextView.R;
11-
import phelat.Utils.FontHelper;
1211

12+
@Deprecated
1313
public class Plus extends AppCompatEditText {
1414

1515
private static final String TAG = "TextViewPlus";
@@ -44,7 +44,7 @@ public boolean setFont(String asset) {
4444

4545
try {
4646

47-
typeface = FontHelper.get(getContext(), asset);
47+
typeface = phelat.utils.Plus.get(getContext(), asset);
4848

4949
} catch (Exception e) {
5050

0 commit comments

Comments
 (0)