Skip to content

Commit

Permalink
Touch Outside Cancelable
Browse files Browse the repository at this point in the history
*Add back cancel dialogue when user touches outside the dialogue feature. This feature was removed in BlurView Creation #1 Part 1 due to setting window fullscreen and floating to false to work with BlurView. 
*Version Bump to v2.4.1.
  • Loading branch information
rayliverified committed Jul 1, 2018
1 parent f5690db commit e00a33d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion customalert/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.searchy2'
version = '2.4.0'
version = '2.4.1'

android {
compileSdkVersion 28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import java.util.ArrayList;
Expand All @@ -55,6 +56,7 @@ public static CustomAlertDialogue getInstance() {
return instance;
}

private View layout;
private TextView title, message;

@Override
Expand Down Expand Up @@ -192,6 +194,20 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {

private void initCommonView(View view) {
//Common elements
layout = view.findViewById(R.id.main_layout);
layout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!builder.getCancelable())
{

}
else
{
dismiss();
}
}
});
title = view.findViewById(R.id.title);
message = view.findViewById(R.id.message);
if (builder.getTitle() != null) {
Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout-land-v21/alert.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout-land/alert.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout-v21/alert.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout-v21/alert_actionsheet.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
2 changes: 1 addition & 1 deletion customalert/src/main/res/layout-v21/alert_input.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"

android:background="@color/transparent"
android:orientation="vertical">

Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout/alert.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout/alert_actionsheet.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
1 change: 1 addition & 0 deletions customalert/src/main/res/layout/alert_input.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
Expand Down

0 comments on commit e00a33d

Please sign in to comment.