Permalink
Browse files

Move jar to libs, some small UI changes, upgrade icon.

  • Loading branch information...
1 parent 562b4b6 commit 41773c5d9475f134975e7763ebe1e747b00f5b6d @mathijs81 mathijs81 committed May 4, 2012
View
@@ -4,6 +4,5 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry kind="lib" path="appbrain-sdk-android.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appbrain.example"
- android:versionCode="8"
- android:versionName="1.5" >
+ android:versionCode="9"
+ android:versionName="1.6" >
- <uses-sdk android:minSdkVersion="4" />
+ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -8,5 +8,5 @@
# project structure.
# Project target.
-target=android-10
-proguard.config=proguard.cfg
+target=android-15
+proguard.config=proguard.cfg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -5,7 +5,7 @@
<com.appbrain.example.fun.LogoView
android:layout_width="fill_parent"
- android:layout_height="150dip" >
+ android:layout_height="120dip" >
</com.appbrain.example.fun.LogoView>
@@ -2,6 +2,6 @@
<resources>
<string name="hello">Hello World! </string>
- <string name="app_name">AppBrain SDK Example</string>
+ <string name="app_name">AppBrain AppLift SDK Example</string>
</resources>
@@ -1,5 +1,6 @@
package com.appbrain.example;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
@@ -90,6 +91,7 @@ public void onBackPressed() {
}
@Override
+ @TargetApi(value=5)
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (android.os.Build.VERSION.SDK_INT < 5 && keyCode == KeyEvent.KEYCODE_BACK
&& event.getRepeatCount() == 0) {
@@ -8,6 +8,7 @@
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Bitmap.Config;
+import android.graphics.Paint.Align;
public class BallGroup {
final int width;
@@ -20,7 +21,7 @@ public BallGroup(int width, int height) {
this.height = height;
balls = new ArrayList<Ball>(0);
- createText(balls, "AppBrain");
+ createText(balls, "AppLift");
}
@@ -33,17 +34,20 @@ private void createText(List<Ball> ballsArrayList, String text) {
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint();
paint.setColor(Color.WHITE);
- paint.setTextSize(70);
+ paint.setTextSize((int) (h * 0.5));
paint.setFakeBoldText(true);
paint.setAntiAlias(true);
+ paint.setTextAlign(Paint.Align.CENTER);
bitmap.eraseColor(Color.BLACK);
- canvas.drawText(text, 20, 90, paint);
+ canvas.drawText(text, w / 2, (int) (h * 0.6), paint);
int pix[] = new int[w * h];
bitmap.getPixels(pix, 0, w, 0, 0, w, h);
- float s = 1.5f;
+ float s = 1.2f;
float[] hsv = new float[3];
+
+ int midx = w / 2, midy = h / 2;
for (int y = 0; y < h; y += step) {
for (int x = 0; x < w; x += step) {
@@ -62,7 +66,7 @@ private void createText(List<Ball> ballsArrayList, String text) {
hsv[1] = 1;
hsv[2] = 1;
- ballsArrayList.add(new Ball(s * x, s * y, 0, radius, Color.HSVToColor(hsv)));
+ ballsArrayList.add(new Ball(s * (x - midx) + midx, s * (y - midy) + midy, 0, radius, Color.HSVToColor(hsv)));
}
}
}
@@ -35,7 +35,7 @@ protected void onDraw(Canvas canvas) {
}
void doUpdate(Canvas canvas) {
- if (ballGroup == null) {
+ if (ballGroup == null || ballGroup.width != getWidth() || ballGroup.height != getHeight()) {
ballGroup = new BallGroup(getWidth(), getHeight());
}

0 comments on commit 41773c5

Please sign in to comment.