Skip to content

Commit 6969228

Browse files
author
Nilanchal Panigrahy
committed
Consolidated all UI examples into single repo
1 parent 840e821 commit 6969228

File tree

275 files changed

+7345
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+7345
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id="FrameAnimation" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" 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+
<option name="BUILDABLE" value="false" />
8+
</configuration>
9+
</facet>
10+
</component>
11+
<component name="NewModuleRootManager" inherit-compiler-output="true">
12+
<exclude-output />
13+
<content url="file://$MODULE_DIR$">
14+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
15+
</content>
16+
<orderEntry type="inheritedJdk" />
17+
<orderEntry type="sourceFolder" forTests="false" />
18+
</component>
19+
</module>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Android-Frame-Animation/app/app.iml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="FrameAnimation" external.system.module.version="unspecified" 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="SELECTED_TEST_ARTIFACT" value="_android_test_" />
13+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
14+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
15+
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
16+
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
17+
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
18+
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
19+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
20+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
21+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
22+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
23+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
24+
</configuration>
25+
</facet>
26+
</component>
27+
<component name="NewModuleRootManager" inherit-compiler-output="false">
28+
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
29+
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
30+
<exclude-output />
31+
<content url="file://$MODULE_DIR$">
32+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
33+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
34+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
36+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
37+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
38+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
40+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
41+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
42+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
43+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
44+
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
45+
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
46+
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
47+
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
48+
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
49+
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
50+
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
51+
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
52+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
53+
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
54+
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
55+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
56+
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
57+
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
58+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
59+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
60+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
61+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
62+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
63+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
64+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
65+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
66+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
67+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
68+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
69+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
70+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
71+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
72+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/jars" />
73+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/21.0.3/jars" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
77+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
78+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
79+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
80+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
81+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
82+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
83+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
84+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
85+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
86+
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
87+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
88+
</content>
89+
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
90+
<orderEntry type="sourceFolder" forTests="false" />
91+
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
92+
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
93+
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
94+
</component>
95+
</module>
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.javatechig.frameanimation"
9+
minSdkVersion 14
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.3'
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.javatechig.frameanimation;
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: 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+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.javatechig.frameanimation" >
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:theme="@style/AppTheme" >
10+
<activity
11+
android:name=".MainActivity"
12+
android:label="@string/app_name" >
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN" />
15+
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.javatechig.frameanimation;
2+
3+
import android.graphics.drawable.AnimationDrawable;
4+
import android.support.v7.app.ActionBarActivity;
5+
import android.os.Bundle;
6+
import android.view.View;
7+
import android.view.View.OnClickListener;
8+
import android.widget.ImageView;
9+
10+
public class MainActivity extends ActionBarActivity implements OnClickListener {
11+
12+
private ImageView view;
13+
private AnimationDrawable frameAnimation;
14+
15+
@Override
16+
protected void onCreate(Bundle savedInstanceState) {
17+
super.onCreate(savedInstanceState);
18+
setContentView(R.layout.activity_main);
19+
20+
// Type casting the Image View
21+
view = (ImageView) findViewById(R.id.imageView);
22+
23+
// Setting animation_list.xml as the background of the image view
24+
view.setBackgroundResource(R.drawable.frame_animation_list);
25+
26+
// Type casting the Animation drawable
27+
frameAnimation = (AnimationDrawable) view.getBackground();
28+
29+
//set true if you want to animate only once
30+
frameAnimation.setOneShot(true);
31+
32+
findViewById(R.id.start).setOnClickListener(this);
33+
findViewById(R.id.stop).setOnClickListener(this);
34+
}
35+
36+
@Override
37+
public void onClick(View v) {
38+
int id = v.getId();
39+
if(id == R.id.start){
40+
frameAnimation.start();
41+
}else if(id==R.id.stop){
42+
frameAnimation.stop();
43+
}
44+
}
45+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:oneshot="false">
4+
<item android:drawable="@drawable/frame1" android:duration="100" />
5+
<item android:drawable="@drawable/frame2" android:duration="100"/>
6+
<item android:drawable="@drawable/frame3" android:duration="100" />
7+
<item android:drawable="@drawable/frame4" android:duration="100" />
8+
<item android:drawable="@drawable/frame5" android:duration="100" />
9+
<item android:drawable="@drawable/frame6" android:duration="100" />
10+
<item android:drawable="@drawable/frame7" android:duration="100" />
11+
<item android:drawable="@drawable/frame8" android:duration="100" />
12+
<item android:drawable="@drawable/frame9" android:duration="100" />
13+
<item android:drawable="@drawable/frame10" android:duration="100" />
14+
</animation-list>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent">
5+
6+
<ImageView
7+
android:id="@+id/imageView"
8+
android:layout_width="wrap_content"
9+
android:layout_height="wrap_content"
10+
android:layout_centerInParent="true"
11+
android:adjustViewBounds="true" />
12+
13+
<LinearLayout
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content"
16+
android:layout_alignParentBottom="true"
17+
android:layout_marginBottom="20dp"
18+
android:orientation="horizontal">
19+
20+
<Button
21+
android:id="@+id/start"
22+
android:layout_width="0dp"
23+
android:layout_height="wrap_content"
24+
android:layout_weight="0.5"
25+
android:text="Start" />
26+
27+
<Button
28+
android:id="@+id/stop"
29+
android:layout_width="0dp"
30+
android:layout_height="wrap_content"
31+
android:layout_weight="0.5"
32+
android:text="Stop" />
33+
</LinearLayout>
34+
</RelativeLayout>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
4+
<item android:id="@+id/action_settings" android:title="@string/action_settings"
5+
android:orderInCategory="100" app:showAsAction="never" />
6+
</menu>
Loading
Loading
Loading
Loading
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+
<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+
</resources>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<string name="app_name">FrameAnimation</string>
3+
4+
<string name="hello_world">Hello world!</string>
5+
<string name="action_settings">Settings</string>
6+
</resources>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
</resources>

Android-Frame-Animation/build.gradle

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.2.3'
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14+
15+
# When configured, Gradle will run in incubating parallel mode.
16+
# This option should only be used with decoupled projects. More details, visit
17+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18+
# org.gradle.parallel=true
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Apr 10 15:27:10 PDT 2013
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

0 commit comments

Comments
 (0)