Skip to content

Commit 5d629a6

Browse files
author
Nilanchal Panigrahy
committed
Consolidated all UI examples into single repo
1 parent 0639384 commit 5d629a6

File tree

30 files changed

+650
-0
lines changed

30 files changed

+650
-0
lines changed
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="java-gradle" name="Java-Gradle">
5+
<configuration>
6+
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
7+
</configuration>
8+
</facet>
9+
</component>
10+
<component name="NewModuleRootManager" inherit-compiler-output="false">
11+
<output url="file://$MODULE_DIR$/build/classes/main" />
12+
<output-test url="file://$MODULE_DIR$/build/classes/test" />
13+
<exclude-output />
14+
<content url="file://$MODULE_DIR$">
15+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
16+
</content>
17+
<orderEntry type="inheritedJdk" />
18+
<orderEntry type="sourceFolder" forTests="false" />
19+
</component>
20+
</module>
21+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android-gradle" name="Android-Gradle">
5+
<configuration>
6+
<option name="GRADLE_PROJECT_PATH" value=":app" />
7+
</configuration>
8+
</facet>
9+
<facet type="android" name="Android">
10+
<configuration>
11+
<option name="SELECTED_BUILD_VARIANT" value="debug" />
12+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
13+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
14+
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
15+
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
16+
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
17+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
18+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
19+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
20+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
21+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
22+
</configuration>
23+
</facet>
24+
</component>
25+
<component name="NewModuleRootManager" inherit-compiler-output="false">
26+
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
27+
<exclude-output />
28+
<content url="file://$MODULE_DIR$">
29+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
30+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
31+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
32+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
33+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
34+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
36+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
37+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
38+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
40+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
41+
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
42+
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
43+
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
44+
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
45+
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
46+
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
47+
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
48+
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
49+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
50+
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
51+
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
52+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
53+
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
54+
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
55+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
56+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
57+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
58+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
59+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
60+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
61+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
62+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
63+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
64+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
65+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
66+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
67+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
68+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
69+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
70+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
71+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
72+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
73+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
77+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
78+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
79+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
80+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
81+
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
82+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
83+
</content>
84+
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
85+
<orderEntry type="sourceFolder" forTests="false" />
86+
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
87+
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
88+
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
89+
</component>
90+
</module>
91+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 21
5+
buildToolsVersion "21.1.2"
6+
7+
defaultConfig {
8+
applicationId "com.example.myapplication"
9+
minSdkVersion 21
10+
targetSdkVersion 21
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
compile "com.android.support:appcompat-v7:21.0.+"
25+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/nilanchalpanigrahy/Library/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.myapplication;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.example.myapplication">
4+
5+
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
8+
<application
9+
android:allowBackup="true"
10+
android:icon="@drawable/ic_launcher"
11+
android:label="@string/app_name"
12+
android:theme="@style/AppTheme">
13+
14+
15+
<activity
16+
android:name=".MainActivity"
17+
android:label="@string/app_name">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.example.myapplication;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
import android.text.Editable;
6+
import android.text.TextWatcher;
7+
import android.view.View;
8+
import android.widget.EditText;
9+
import android.widget.TextView;
10+
11+
public class MainActivity extends Activity {
12+
private EditText passwordEditText;
13+
private TextView textView;
14+
15+
@Override
16+
protected void onCreate(Bundle savedInstanceState) {
17+
super.onCreate(savedInstanceState);
18+
setContentView(R.layout.activity_main);
19+
20+
/* Initializing views */
21+
passwordEditText = (EditText) findViewById(R.id.password);
22+
textView = (TextView) findViewById(R.id.passwordHint);
23+
textView.setVisibility(View.GONE);
24+
25+
/* Set Text Watcher listener */
26+
passwordEditText.addTextChangedListener(passwordWatcher);
27+
}
28+
29+
private final TextWatcher passwordWatcher = new TextWatcher() {
30+
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
31+
32+
}
33+
34+
public void onTextChanged(CharSequence s, int start, int before, int count) {
35+
textView.setVisibility(View.VISIBLE);
36+
}
37+
38+
public void afterTextChanged(Editable s) {
39+
if (s.length() == 0) {
40+
textView.setVisibility(View.GONE);
41+
} else{
42+
textView.setText("You have entered : " + passwordEditText.getText());
43+
}
44+
}
45+
};
46+
}
Loading
Loading
Loading
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="fill_parent"
3+
android:layout_height="fill_parent"
4+
android:orientation="vertical"
5+
android:padding="10dp">
6+
7+
<TextView
8+
android:layout_width="wrap_content"
9+
android:layout_height="wrap_content"
10+
android:paddingBottom="10dp"
11+
android:text="Enter your password and see the magic!!"
12+
android:textAppearance="?android:attr/textAppearanceLarge"
13+
android:textStyle="bold" />
14+
15+
<EditText
16+
android:id="@+id/password"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
android:hint="Password"
20+
android:inputType="textPassword"
21+
android:padding="12dp">
22+
23+
<requestFocus />
24+
</EditText>
25+
26+
<TextView
27+
android:id="@+id/passwordHint"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:layout_below="@+id/password"
31+
android:background="#ffd33a26"
32+
android:padding="5dp"
33+
android:text="* Not Entered"
34+
android:textColor="#fff" />
35+
36+
37+
</LinearLayout>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
tools:context=".MainActivity">
4+
5+
</menu>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
3+
(such as screen margins) for screens with more than 820dp of available width. This
4+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5+
<dimen name="activity_horizontal_margin">64dp</dimen>
6+
</resources>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="red">#F44336</color>
4+
5+
</resources>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Default screen margins, per the Android Design guidelines. -->
3+
<dimen name="activity_horizontal_margin">16dp</dimen>
4+
<dimen name="activity_vertical_margin">16dp</dimen>
5+
6+
</resources>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">My Application</string>
5+
<string name="hello_world">Hello world!</string>
6+
<string name="action_settings">Settings</string>
7+
8+
9+
10+
</resources>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
</style>
7+
8+
9+
10+
</resources>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:1.0.0'
9+
10+
// NOTE: Do not place your application dependencies here; they belong
11+
// in the individual module build.gradle files
12+
}
13+
}
14+
15+
allprojects {
16+
repositories {
17+
jcenter()
18+
}
19+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<items version="2" >
3+
4+
<item
5+
jar="/Users/nilanchalpanigrahy/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/21.0.3/support-annotations-21.0.3.jar"
6+
jumboMode="false"
7+
revision="21.1.2"
8+
sha1="4b74cefe1f0c1b819e7260c8627a14674e37fd35">
9+
<dex dex="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/pre-dexed/debug/support-annotations-21.0.3-efc401a1c671befc4f3aa78320dfb7c6e18352af.jar" />
10+
</item>
11+
<item
12+
jar="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/classes.jar"
13+
jumboMode="false"
14+
revision="21.1.2"
15+
sha1="81d42bf983a8741f4888a6e333e454e4a5e0eeb7">
16+
<dex dex="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/pre-dexed/debug/classes-4bf27b4cbdf65063057246cc608d6250d0b3de1b.jar" />
17+
</item>
18+
<item
19+
jar="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/classes.jar"
20+
jumboMode="false"
21+
revision="21.1.2"
22+
sha1="2c91c949a45a21cdecf26e03951e46c7beec9ad8">
23+
<dex dex="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/pre-dexed/debug/classes-c7047fbd05dbc0444c2966aeee8a5b1ecfb8c002.jar" />
24+
</item>
25+
<item
26+
jar="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/libs/internal_impl-21.0.3.jar"
27+
jumboMode="false"
28+
revision="21.1.2"
29+
sha1="01ec05bfbafcc07646ba813000bf2ef11742dd03">
30+
<dex dex="/Users/nilanchalpanigrahy/AndroidStudioProjects/MyApplication/app/build/intermediates/pre-dexed/debug/internal_impl-21.0.3-43e16aa8d597e81ed5fc893e3b702dff36c683a5.jar" />
31+
</item>
32+
33+
</items>
Binary file not shown.
Loading

0 commit comments

Comments
 (0)