-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c61f561
Showing
14 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>ImprovedHelloAndroid</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ApkBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.breadcrumbz.android.hello" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
|
||
|
||
<application android:icon="@drawable/icon" android:label="@string/app_name"> | ||
<activity android:name=".HelloAndroid" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
</manifest> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system use, | ||
# "build.properties", and override values to adapt the script to your | ||
# project structure. | ||
|
||
# Project target. | ||
target=Google Inc.:Google APIs:7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-optimizationpasses 5 | ||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-dontpreverify | ||
-verbose | ||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | ||
|
||
-keep public class * extends android.app.Activity | ||
-keep public class * extends android.app.Application | ||
-keep public class * extends android.app.Service | ||
-keep public class * extends android.content.BroadcastReceiver | ||
-keep public class * extends android.content.ContentProvider | ||
-keep public class * extends android.app.backup.BackupAgentHelper | ||
-keep public class * extends android.preference.Preference | ||
-keep public class com.android.vending.licensing.ILicensingService | ||
|
||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
-keepclasseswithmembernames class * { | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
} | ||
|
||
-keepclasseswithmembernames class * { | ||
public <init>(android.content.Context, android.util.AttributeSet, int); | ||
} | ||
|
||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
-keep class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable$Creator *; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:id="@+id/window" | ||
> | ||
<TextView | ||
android:id="@+id/helloClass" | ||
android:gravity="center" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/hello" | ||
android:textStyle="bold" | ||
android:textSize="20px" | ||
android:textColor="#FFFFFFFF" | ||
/> | ||
<TextView | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/prompt" | ||
/> | ||
<EditText | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/helloName" | ||
/> | ||
<Button | ||
android:id="@+id/go" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/press" | ||
/> | ||
<Button | ||
android:id="@+id/toggle" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/change" | ||
/> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="prompt">Enter Your Text Here:</string> | ||
<string name="app_name">Hello 21w789</string> | ||
<string name="press">Press Me!</string> | ||
<string name="change">Sleep</string> | ||
<string name="hello">Hello 21w789</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package com.breadcrumbz.android.hello; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.View.OnClickListener; | ||
import android.widget.EditText; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
import android.widget.Toast; | ||
import android.content.Context; | ||
import android.graphics.Color; | ||
import android.view.View; | ||
|
||
public class HelloAndroid extends Activity { | ||
|
||
EditText helloName; | ||
TextView helloClass; | ||
Button buttonToggle; | ||
|
||
/** Called when the activity is first created. */ | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) | ||
{ | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.main); | ||
// Capture our button from layout | ||
Button buttonToast = (Button)findViewById(R.id.go); | ||
// Register the onClick listener with the implementation above | ||
buttonToast.setOnClickListener(mAddListener); | ||
// Capture our button from layout | ||
buttonToggle = (Button)findViewById(R.id.toggle); | ||
// Register the onClick listener with the implementation above | ||
buttonToggle.setOnClickListener(cAddListener); | ||
} | ||
|
||
// Create an anonymous implementation of OnClickListener | ||
private OnClickListener mAddListener = new OnClickListener() | ||
{ | ||
public void onClick(View v) | ||
{ | ||
long id = 0; | ||
// do something when button is clicked | ||
try | ||
{ | ||
helloName = (EditText)findViewById(R.id.helloName); | ||
Context context = getApplicationContext(); | ||
CharSequence text = "Hello " + helloName.getText() + "!"; | ||
int duration = Toast.LENGTH_LONG; | ||
Toast toast = Toast.makeText(context, text, duration); | ||
toast.show(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Context context = getApplicationContext(); | ||
CharSequence text = ex.toString() + "ID = " + id; | ||
int duration = Toast.LENGTH_LONG; | ||
Toast toast = Toast.makeText(context, text, duration); | ||
toast.show(); | ||
} | ||
} | ||
}; | ||
|
||
// Create an anonymous implementation of OnClickListener | ||
private OnClickListener cAddListener = new OnClickListener() | ||
{ | ||
public void onClick(View v) | ||
{ | ||
// do something when button is clicked | ||
helloClass = (TextView)findViewById(R.id.helloClass); | ||
String toggleWord = (String) buttonToggle.getText(); | ||
if (toggleWord.equals("Sleep")) | ||
{ | ||
helloClass.setTextColor(Color.BLACK); | ||
helloClass.setText("Good Bye 21w789"); | ||
buttonToggle.setText("Wake"); | ||
findViewById(R.id.window).setBackgroundColor(Color.WHITE); | ||
} | ||
else | ||
{ | ||
helloClass.setTextColor(Color.WHITE); | ||
helloClass.setText("Hello 21w789"); | ||
buttonToggle.setText("Sleep"); | ||
findViewById(R.id.window).setBackgroundColor(Color.BLACK); | ||
} | ||
|
||
} | ||
}; | ||
} |