布局文件

 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 2     xmlns:tools="http://schemas.android.com/tools"
 3     android:layout_width="match_parent"
 4     android:layout_height="match_parent"
 5     android:orientation="vertical"
 6     android:paddingBottom="@dimen/activity_vertical_margin"
 7     android:paddingLeft="@dimen/activity_horizontal_margin"
 8     android:paddingRight="@dimen/activity_horizontal_margin"
 9     android:paddingTop="@dimen/activity_vertical_margin"
10     tools:context=".MainActivity" >
11 
12     <LinearLayout
13         android:layout_width="match_parent"
14         android:layout_height="wrap_content" >
15 
16         <Button
17             android:layout_width="0dp"
18             android:layout_height="wrap_content"
19             android:layout_weight="1"
20             android:onClick="zoomIn"
21             android:text="放大" />
22 
23         <Button
24             android:layout_width="0dp"
25             android:layout_height="wrap_content"
26             android:layout_weight="1"
27             android:onClick="zoomOut"
28             android:text="缩小" />
29 
30         <Button
31             android:layout_width="0dp"
32             android:layout_height="wrap_content"
33             android:layout_weight="1"
34             android:onClick="rotate"
35             android:text="旋转" />
36 
37         <Button
38             android:layout_width="0dp"
39             android:layout_height="wrap_content"
40             android:layout_weight="1"
41             android:onClick="inverse"
42             android:text="镜像" />
43     </LinearLayout>
44 
45     <ImageView
46         android:id="@+id/imageView"
47         android:layout_width="wrap_content"
48         android:layout_height="wrap_content"
49         android:src="@drawable/qq" />
50 
51 </LinearLayout>
View Code

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2021-05-16
  • 2021-07-05
  • 2022-12-23
  • 2021-11-29
  • 2021-12-26
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2021-06-17
  • 2021-10-13
  • 2021-08-28
  • 2022-12-23
相关资源
相似解决方案