Skip to content

Commit 5d42aa1

Browse files
bug fixed
1 parent 8b57524 commit 5d42aa1

File tree

9 files changed

+145
-4
lines changed

9 files changed

+145
-4
lines changed

.idea/caches/gradle_models.ser

18.7 KB
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Provides you easily create various pop-up dialogs that you can use.
5656
cancelable(boolean bool) // set cancelable to fast-dialog
5757
decimalEditText() // set EditText to decimalEditText
5858
numberEditText() // set EditText to numberEditText
59+
numberUsername() // set Username edittext input type to number
60+
numberPassword() // set Password edittext input type to number
5961
setTextMaxLength(int length) // set EditText max length
6062
setMinValue(int min) // set number picker minimum value
6163
setMaxValue(int max) // set number picker maximum value

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ android {
2626

2727
dependencies {
2828
implementation fileTree(include: ['*.jar'], dir: 'libs')
29-
implementation 'androidx.appcompat:appcompat:1.0.2'
29+
implementation 'androidx.appcompat:appcompat:1.1.0'
3030
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3131
implementation project(':fastdialog')
3232
}

app/src/main/java/ka/enes/com/sample/MainActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public void login(View view){
3939
dialog = new FastDialogBuilder(this,Type.LOGIN)
4040
//.loginWithEmail()
4141
.setTitleText("Login")
42+
.numberUsername()
43+
.numberPassword()
44+
.setText("Login warn text | Login warn text ")
4245
.changeColor(ContextCompat.getColor(getApplicationContext(),R.color.different),
4346
ContextCompat.getColor(getApplicationContext(),R.color.text2),
4447
ContextCompat.getColor(getApplicationContext(),R.color.text))

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.4.2'
10+
classpath 'com.android.tools.build:gradle:3.5.0'
1111

1212

1313
// NOTE: Do not place your application dependencies here; they belong

fastdialog/src/main/java/karpuzoglu/enes/com/fastdialog/FastDialogBuilder.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import androidx.recyclerview.widget.GridLayoutManager;
1010
import androidx.recyclerview.widget.RecyclerView;
1111
import android.text.InputFilter;
12+
import android.text.InputType;
1213
import android.text.method.PasswordTransformationMethod;
1314
import android.view.Gravity;
1415
import android.view.View;
@@ -74,6 +75,7 @@ private FastDialogBuilder createDialog(Type type){
7475
tvTitle = dialog.findViewById(R.id.login_dialog_title);
7576
etUsername = dialog.findViewById(R.id.login_dialog_username);
7677
etPassword = dialog.findViewById(R.id.login_dialog_password);
78+
tvWarning = dialog.findViewById(R.id.login_dialog_text);
7779
Drawable imgPassword = context.getResources().getDrawable(R.drawable.ic_password_black);
7880
imgPassword.setBounds(0, 0, 45, 45);
7981
etPassword.setCompoundDrawables(imgPassword, null, null, null);
@@ -287,6 +289,14 @@ public FastDialogBuilder loginWithEmail(){
287289
etUsername.setCompoundDrawables(img,null,null,null);
288290
return this;
289291
}
292+
public FastDialogBuilder numberPassword(){
293+
etPassword.setInputType(InputType.TYPE_CLASS_NUMBER|InputType.TYPE_NUMBER_VARIATION_PASSWORD);
294+
return this;
295+
}
296+
public FastDialogBuilder numberUsername(){
297+
etUsername.setInputType(InputType.TYPE_CLASS_NUMBER);
298+
return this;
299+
}
290300
public FastDialogBuilder negativeText(String negative){
291301
btCancel.setVisibility(View.VISIBLE);
292302
btCancel.setText(negative);

fastdialog/src/main/res/layout/login_dialog.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
android:textColor="@color/text2"
2020
android:textSize="15dp"
2121
android:textStyle="bold" />
22+
<TextView
23+
android:id="@+id/login_dialog_text"
24+
android:layout_width="match_parent"
25+
android:layout_height="wrap_content"
26+
android:gravity="center"
27+
android:padding="5dp"
28+
android:layout_marginStart="15dp"
29+
android:layout_marginEnd="15dp"
30+
android:visibility="gone"
31+
android:textSize="15dp"/>
2232
<karpuzoglu.enes.com.fastdialog.ClearableEditText
2333
android:id="@+id/login_dialog_username"
2434
android:layout_width="match_parent"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Jun 12 13:46:20 EET 2019
1+
#Tue Aug 27 13:34:09 EET 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)