Skip to content

Commit

Permalink
ReadMe Creation #2 Part 2
Browse files Browse the repository at this point in the history
*Create documentation screenshots.
  • Loading branch information
rayliverified committed Feb 11, 2018
1 parent 0b81a5b commit 3a50acf
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Custom AlertView Dialogue provides many customization methods to display the ale

**Simple Alert - a simple popup message.**

![Screenshots](screenshots/Custom-Permissions-Dialogue-All_540x.jpg)
![Screenshots](screenshots/Simple-Alert_480x.png)

```java
CustomAlertDialogue.Builder alert = new CustomAlertDialogue.Builder(MainActivity.this)
Expand All @@ -78,7 +78,7 @@ alert.show();

**Confirmation Alert - a popup dialogue with two customizable choices.**

![Screenshots](screenshots/Custom-Permissions-Dialogue-Required_540x.jpg)
![Screenshots](screenshots/Confirmation-Alert_540x.png)

```java
CustomAlertDialogue.Builder alert = new CustomAlertDialogue.Builder(MainActivity.this)
Expand Down Expand Up @@ -110,7 +110,7 @@ alert.show();

**Selector - a scrollable list of options.**

![Screenshots](screenshots/Custom-Permissions-Dialogue-Optional_540x.jpg)
![Screenshots](screenshots/Selector_500x.png)

```java
ArrayList<String> destructive = new ArrayList<>();
Expand Down Expand Up @@ -154,7 +154,7 @@ alert.show();

**Action Sheet - a highly customizable bottom menu.**

![Screenshots](screenshots/Custom-Permissions-Dialogue-Single_540x.jpg)
![Screenshots](screenshots/Action-Sheet_540x.png)

```java
ArrayList<String> other = new ArrayList<String>();
Expand Down Expand Up @@ -207,7 +207,7 @@ alert.show();

**Input Box - helps collect user input. Can be used as a contact/feedback form.**

![Screenshots](screenshots/Custom-Permissions-Dialogue-Combined_540x.jpg)
![Screenshots](screenshots/Input-Box_540x.png)

```java
ArrayList<String> lineHint = new ArrayList<>();
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ dependencies {

implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
}
29 changes: 29 additions & 0 deletions app/src/main/java/stream/customalertapp/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import android.os.Handler;
import android.os.Vibrator;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.CardView;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.Toast;

import java.util.ArrayList;
Expand All @@ -21,6 +23,9 @@

public class MainActivity extends AppCompatActivity{

ImageView mBackground;
CardView mCardView;

private Context mContext;

@Override
Expand All @@ -36,6 +41,9 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
mContext = getApplicationContext();

mBackground = findViewById(R.id.background);
mCardView = findViewById(R.id.cardview);

//Simple Alert - a simple popup message.
CustomButton btn1 = findViewById(R.id.btn1);
btn1.setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -288,6 +296,27 @@ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
alert.show();
}

//Hide background for screenshots.
public void HideBackground(boolean hide)
{
if (hide)
{
mBackground.setVisibility(View.GONE);
mCardView.setVisibility(View.GONE);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
HideBackground(false);
}
}, 5000);
}
else
{
mBackground.setVisibility(View.VISIBLE);
mCardView.setVisibility(View.VISIBLE);
}
}

@Override
protected void onPause() {
Expand Down
1 change: 0 additions & 1 deletion customalert/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ dependencies {
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
}

Binary file added screenshots/Action-Sheet_540x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Confirmation-Alert_540x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Input-Box_540x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Selector_500x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Simple-Alert_480x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a50acf

Please sign in to comment.