Skip to content

Commit

Permalink
New version v20.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
TutorialsAndroid committed Oct 18, 2022
1 parent 521f175 commit 9c60fbb
Show file tree
Hide file tree
Showing 396 changed files with 9,676 additions and 28,112 deletions.
Binary file modified .gradle/7.4/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.4/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file modified .gradle/file-system.probe
Binary file not shown.
3,000 changes: 320 additions & 2,680 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![](https://github.com/TutorialsAndroid/KAlertDialog/blob/master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png)

# New version released v20.2.3 on 18-10-2022
# New version released v20.2.4 on 18-10-2022
## Changelogs
- Fixed issue in button not changing color in NORMAL_TYPE dialog
- Now you can hide confirm and cancel button on alert dialog type change
Expand Down Expand Up @@ -68,7 +68,7 @@ Add it in your root build.gradle at the end of repositories:
Step 2. Add the dependency

dependencies {
implementation 'com.github.TutorialsAndroid:KAlertDialog:v20.2.3'
implementation 'com.github.TutorialsAndroid:KAlertDialog:v20.2.4'
}

## Usage
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
o/debug
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i/
Binary file not shown.
Binary file modified library/build/intermediates/compile_r_class_jar/debug/R.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@ int id container 0x0
int id content 0x0
int id contentPanel 0x0
int id content_text 0x0
int id content_text2 0x0
int id contiguous 0x0
int id coordinator 0x0
int id cos 0x0
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Tue Oct 18 15:26:10 IST 2022
#Tue Oct 18 21:14:49 IST 2022
com.developer.kalert.library-pngs-0\:/drawable-xxhdpi/ic_success_tick.png=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\library\\build\\intermediates\\packaged_res\\debug\\drawable-xxhdpi-v4\\ic_success_tick.png
com.developer.kalert.library-main-7\:/layout/alert_dialog.xml=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\library\\build\\intermediates\\packaged_res\\debug\\layout\\alert_dialog.xml
com.developer.kalert.library-main-7\:/drawable/success_circle.xml=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\library\\build\\intermediates\\packaged_res\\debug\\drawable\\success_circle.xml
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ drawable warning_circle
drawable warning_sigh
id cancel_button
id content_text
id content_text2
id custom_big_image
id custom_confirm_button
id custom_image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
android:textColor="?attr/alertDialogContentTextColor"
android:visibility="gone" />

<WebView
android:id="@+id/content_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>

<FrameLayout
android:id="@+id/custom_view_container"
android:layout_width="match_parent"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,7 @@ id container
id content
id contentPanel
id content_text
id content_text2
id contiguous
id coordinator
id cos
Expand Down
Binary file not shown.
51 changes: 50 additions & 1 deletion library/src/main/java/com/developer/kalert/KAlertDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;

Expand All @@ -22,6 +23,7 @@
import android.view.animation.Transformation;

import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
Expand Down Expand Up @@ -50,14 +52,16 @@ public class KAlertDialog extends AlertDialog implements View.OnClickListener {
private final Animation mOverlayOutAnim, mImageAnim;

private TextView mTitleTextView, mContentTextView;
private WebView justifyContentTextView;
private ImageView mErrorX, mSuccessTick, mCustomImage, mCustomBigImage;
private Drawable mCustomImgDrawable;
private AppCompatButton mConfirmButton, mCancelButton;
private Drawable mColor, mCancelColor;
private View mDialogView;
private FrameLayout mCustomViewContainer;

private String mTitleText, mContentText, mCancelText, mConfirmText, mInputFieldHint;
private String mTitleText, mContentText, justifyContentText, justifyContentTextColor,
justifyContentTextSize, mCancelText, mConfirmText, mInputFieldHint;
private String imageURL;
private String titleFont, contentFont;
private int displayType;
Expand Down Expand Up @@ -111,6 +115,7 @@ protected void onCreate(Bundle savedInstanceState) {
mDialogView = Objects.requireNonNull(getWindow()).getDecorView().findViewById(android.R.id.content);
mTitleTextView = findViewById(R.id.title_text);
mContentTextView = findViewById(R.id.content_text);
justifyContentTextView = findViewById(R.id.content_text2);
mErrorFrame = findViewById(R.id.error_frame);
assert mErrorFrame != null;
mErrorX = mErrorFrame.findViewById(R.id.error_x);
Expand All @@ -135,6 +140,7 @@ protected void onCreate(Bundle savedInstanceState) {
dialogTitleFont(titleFont);
dialogContentFont(contentFont);
setContentText(mContentText);
justifyContentText(justifyContentText, justifyContentTextColor, justifyContentTextSize);
setCancelText(mCancelText);
setCancelText(mCancelText, cancelTextColor);
setConfirmText(mConfirmText);
Expand Down Expand Up @@ -427,6 +433,43 @@ public KAlertDialog setContentText(String text) {
return this;
}

/**
* This method is for test only use at your own risk
* its not fully customizable like we can't use custom fonts
* it's still under development. We respect to your contribution if you
* have any idea then please contribute to this library.
* @param content: dialog content text
* @param textColor: write the name of text color same as we use in html css for ex: red, grey, white, black
* @param fontSize: set the font size in px for example 16px, 18px, 20px,
* @return ---
*/
public KAlertDialog justifyContentText(String content, String textColor, String fontSize) {
justifyContentText = content;
justifyContentTextColor = textColor;
justifyContentTextSize = fontSize;
if ( justifyContentTextView != null && justifyContentText != null &&
justifyContentTextColor != null && justifyContentTextSize != null)
{
justifyContentTextView.setBackgroundColor(Color.TRANSPARENT);
showJustifyText(true);
String text;
text = "<html><body><p ";
text+= "style=\"color:";
text+= textColor;
text+= ";";
text+= "font-size:";
text+= justifyContentTextSize;
text+= "\"";
text+= "align=\"justify\">";
text+= justifyContentText;
text+= "</p></body></html>";
justifyContentTextView.loadData(text, "text/html", "utf-8");
} else {
showJustifyText(false);
}
return this;
}

public KAlertDialog showCancelButton ( boolean isShow){
mShowCancel = isShow;
if (mCancelButton != null) {
Expand Down Expand Up @@ -473,6 +516,12 @@ private void showContentText (boolean isShow) {
}
}

private void showJustifyText(boolean isShow) {
if (justifyContentTextView != null) {
justifyContentTextView.setVisibility(isShow ? View.VISIBLE : GONE);
}
}

@Deprecated
public KAlertDialog setCancelClickListener (KAlertClickListener listener){
mCancelClickListener = listener;
Expand Down
6 changes: 6 additions & 0 deletions library/src/main/res/layout-sw600dp/alert_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
android:visibility="gone"
android:textColor="?attr/alertDialogContentTextColor"/>

<WebView
android:id="@+id/content_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>

<FrameLayout
android:id="@+id/custom_view_container"
android:layout_width="match_parent"
Expand Down
6 changes: 6 additions & 0 deletions library/src/main/res/layout/alert_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
android:textColor="?attr/alertDialogContentTextColor"
android:visibility="gone" />

<WebView
android:id="@+id/content_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>

<FrameLayout
android:id="@+id/custom_view_container"
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.developer.kalert.alert"
minSdkVersion 19
targetSdkVersion 33
versionCode 30
versionName "20.2.3"
versionCode 31
versionName "20.2.4"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.developer.kalert.alert";
public static final String BUILD_TYPE = "debug";
public static final int VERSION_CODE = 29;
public static final String VERSION_NAME = "20.2.2";
public static final int VERSION_CODE = 30;
public static final String VERSION_NAME = "20.2.3";
}
20 changes: 20 additions & 0 deletions sample/build/intermediates/apk/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.developer.kalert.alert",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 30,
"versionName": "20.2.3",
"outputFile": "sample-debug.apk"
}
],
"elementType": "File"
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#- File Locator -
listingFile=../../../outputs/apk/debug/output-metadata.json
listingFile=../../apk/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
appMetadataVersion=1.1
androidGradlePluginVersion=7.3.0
androidGradlePluginVersion=7.3.1
Binary file not shown.
Binary file not shown.
Binary file modified sample/build/intermediates/dex/debug/mergeDexDebug/classes.dex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Tue Oct 18 15:26:19 IST 2022
#Tue Oct 18 21:14:52 IST 2022
com.developer.kalert.alert.sample-main-34\:/mipmap-xxxhdpi/ic_launcher.png=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\sample\\build\\intermediates\\merged_res\\debug\\mipmap-xxxhdpi_ic_launcher.png.flat
com.developer.kalert.alert.sample-main-34\:/mipmap-hdpi/ic_launcher.png=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\sample\\build\\intermediates\\merged_res\\debug\\mipmap-hdpi_ic_launcher.png.flat
com.developer.kalert.alert.sample-main-34\:/layout/sample_activity.xml=D\:\\Projects\\AndroidLibraries\\KAlertDialog-master\\sample\\build\\intermediates\\merged_res\\debug\\layout_sample_activity.xml.flat
Expand Down
Loading

0 comments on commit 9c60fbb

Please sign in to comment.