Skip to content

Commit

Permalink
init sample App
Browse files Browse the repository at this point in the history
  • Loading branch information
nordan committed Jul 19, 2020
1 parent 91516c0 commit 9c10949
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 0 deletions.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions sampleapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
35 changes: 35 additions & 0 deletions sampleapp/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"

defaultConfig {
minSdkVersion 24
targetSdkVersion 30
versionCode 1
versionName "Nordan Material Dialog v1.1.5"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.10'
implementation 'com.google.android.material:material:1.1.0'
implementation project(path: ':app')
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
implementation 'com.github.bumptech.glide:glide:4.11.0'

}
21 changes: 21 additions & 0 deletions sampleapp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
25 changes: 25 additions & 0 deletions sampleapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.nordan.sampleapp">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DialogCreator" />
<activity android:name=".DefaultDialog" />
</application>

</manifest>
26 changes: 26 additions & 0 deletions sampleapp/src/main/java/com/nordan/sampleapp/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.nordan.sampleapp;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
findViewById(R.id.btn_create).setOnClickListener(click -> showDialogCreator());
findViewById(R.id.btn_default).setOnClickListener(click -> showDefaultDialogs());
}

private void showDialogCreator() {
startActivity(new Intent(this, DialogCreator.class));
}

private void showDefaultDialogs() {
startActivity(new Intent(this, DefaultDialog.class));
}
}
18 changes: 18 additions & 0 deletions sampleapp/src/main/res/layout/main_activity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_dialogs" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_create"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/create_your_dialog" />
</LinearLayout>
6 changes: 6 additions & 0 deletions sampleapp/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#B71C1C</color>
</resources>
9 changes: 9 additions & 0 deletions sampleapp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>
<string name="app_name">SampleApp</string>
<string name="default_dialogs">Default dialogs</string>
<string name="create_your_dialog">Create your dialog</string>
<string name="dialog_creator">Dialog Creator</string>
<string name="tittle">Tittle</string>
<string name="animation">Animation</string>
<string name="none">None</string>
</resources>
11 changes: 11 additions & 0 deletions sampleapp/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorRed</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>

</resources>

0 comments on commit 9c10949

Please sign in to comment.