Skip to content

Commit

Permalink
Merge pull request #856 from zhuoxw/master
Browse files Browse the repository at this point in the history
  • Loading branch information
zengsn committed May 30, 2016
2 parents 09fdf94 + a86e6ce commit 4d0b9e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148;
package edu.hzuapps.androidworks.homeworks.net1314080903148;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.hardware.SensorListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;

import net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148.R;

@SuppressWarnings("deprecation")

Expand Down Expand Up @@ -138,7 +137,6 @@ public void onSensorChanged(int sensor, float[] values) {
mv.postInvalidate();//重绘MainView
}
} //传感器监听器类

};

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148;
package edu.hzuapps.androidworks.homeworks.net1314080903148;

/**
* Created by zhuoxw on 2016/5/12.
* Created by zhuo on 2016/5/12.
*/

import android.content.Context;
Expand All @@ -15,11 +15,10 @@
import android.util.AttributeSet;
import android.view.View;

import net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148.R;

public class Net1314080903148MainView extends View {

Paint paint = new Paint(); //画笔
Bitmap shangBitmap1; //上面的大矩形
Bitmap shangBitmap1; //上面的大矩形图
Bitmap shangBitmap2; //上面的气泡
Bitmap zuoBitmap1; //左面的大矩形图
Bitmap zuoBitmap2; //左面图的气泡
Expand Down Expand Up @@ -82,7 +81,6 @@ protected void onDraw(Canvas canvas){//重写的绘制方法
paint.setColor(Color.BLUE); //设置画笔颜色
paint.setStyle(Style.STROKE); //设置画笔为不填充


//画背景矩形
canvas.drawBitmap(shangBitmap1, shang1_X,shang1_Y, paint); //上
canvas.drawBitmap(zuoBitmap1, zuo1_X,zuo1_Y, paint); //左
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/activity_net1314080903148_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148.Net1314080903148MainActivity">
tools:context="edu.hzuapps.androidworks.homeworks.net1314080903148.Net1314080903148MainActivity">

<net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148.Net1314080903148MainView
<edu.hzuapps.androidworks.homeworks.net1314080903148.Net1314080903148MainView
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="fill_parent"
Expand All @@ -18,5 +18,6 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="36dp">
</net1314080903148.homeworks.androidworks.hzuapps.edu.net1314080903148.Net1314080903148MainView>
</edu.hzuapps.androidworks.homeworks.net1314080903148.Net1314080903148MainView>

</RelativeLayout>

0 comments on commit 4d0b9e8

Please sign in to comment.