Skip to content

Commit

Permalink
Switched order of XML and code drawables in startup menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sergedesmedt committed Nov 28, 2012
1 parent e243612 commit 9fccba7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion YetAnotherDrawableDemo/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="com.hfk.yadd"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" />
<uses-sdk android:minSdkVersion="10"/>

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".YetAnotherDrawableDemoActivity"
Expand Down
2 changes: 1 addition & 1 deletion YetAnotherDrawableDemo/res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="views_available">
<item>Drawable in code</item>
<item>Drawable in XML</item>
<item>Drawable in code</item>
<item>Matrix Transformations</item>
<item>Camera Transformations</item>
</string-array>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.ArcShape;
import android.graphics.drawable.shapes.OvalShape;
Expand All @@ -23,6 +22,8 @@ public CustomDrawableView(Context context) {
}

protected void onDraw(Canvas canvas) {
rectangleDrawable.getPaint().setColor(0xff74AC23);
ovalDrawable.getPaint().setColor(0xff74AC23);
arcDrawable.getPaint().setColor(0xff74AC23);

if(fSetBounds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ protected void onListItemClick(ListView l, View v, int position, long id) {

Intent myIntent = null;
if(position == 0)
myIntent = new Intent(YetAnotherDrawableDemoActivity.this, CustomDrawableActivity.class);
if(position == 1)
myIntent = new Intent(YetAnotherDrawableDemoActivity.this, CustomDrawableFromXMLActivity.class);
if(position == 1)
myIntent = new Intent(YetAnotherDrawableDemoActivity.this, CustomDrawableActivity.class);
if(position == 2)
myIntent = new Intent(YetAnotherDrawableDemoActivity.this, CustomDrawableMatrixTransformationActivity.class);
if(position == 3)
Expand Down

0 comments on commit 9fccba7

Please sign in to comment.