Skip to content

Commit

Permalink
hzuapps#95 实验9 完善代码,完成实验
Browse files Browse the repository at this point in the history
  • Loading branch information
1245183042 committed Jun 22, 2016
1 parent 03dcdd1 commit 5e74c24
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.rgb;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
Expand All @@ -20,6 +17,9 @@
import android.widget.ImageView;
import android.widget.TextView;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

public class Net1314080903131RGBActivity extends Activity {
private TextView tv_rgb;
private ImageView iv_image;
Expand All @@ -38,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.net1314080903131activity_rgb);


tv_rgb = (TextView) findViewById(R.id.textview);
btnColor = (Button) findViewById(R.id.btnColor);
iv_image = (ImageView) findViewById(R.id.iv_image);
Expand Down Expand Up @@ -67,7 +67,7 @@ public boolean onTouch(View v, MotionEvent event) {
Log.i(TAG, "r=" + r + ",g=" + g + ",b=" + b);
tv_rgb.setText("a=" + a + ",r=" + r + ",g=" + g + ",b="
+ b);
btnColor.setTextColor(Color.rgb(r, g, b));
btnColor.setBackgroundColor(Color.rgb(r, g, b));
}
return true;
}
Expand Down

0 comments on commit 5e74c24

Please sign in to comment.