Skip to content

Commit

Permalink
change target api
Browse files Browse the repository at this point in the history
  • Loading branch information
caifangmao committed Jan 26, 2015
1 parent a345377 commit 3acfbbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="14" />
android:targetSdkVersion="21" />

<application
android:allowBackup="true"
Expand Down
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-14
target=android-21
10 changes: 6 additions & 4 deletions src/com/example/bitmapmesh/BitmapMeshView.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ public void onDraw(Canvas canvas) {
if (channel < 255) {
alpha = (int) ((255 - channel) / 120.0F * maxAlpha) * 4;
}
channel = channel < 0 ? 0 : channel;
channel = channel > 255 ? 255 : channel;
if (newApiFlag) {
channel = channel < 0 ? 0 : channel;
channel = channel > 255 ? 255 : channel;

color = 0xFF000000 | channel << 16 | channel << 8 | channel;
color = 0xFF000000 | channel << 16 | channel << 8 | channel;

colors[index] = color;
colors[index] = color;
}

index += 1;
}
Expand Down

0 comments on commit 3acfbbb

Please sign in to comment.