Android:UI控件GestureOverlayView、gesture、手势

简介:

XML代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<android.gesture.GestureOverlayView xmlns:android= "http://schemas.android.com/apk/res/android"
     xmlns:tools= "http://schemas.android.com/tools"
     android:id= "@+id/gestureOverlayView1"
     android:layout_width= "match_parent"
     android:layout_height= "match_parent"
     android:layout_alignParentLeft= "true"
     android:layout_alignParentTop= "true"  >
     <RelativeLayout
         android:layout_width= "match_parent"
         android:layout_height= "match_parent"
         tools:context= ".MainActivity"  >
         <TextView
             android:id= "@+id/textView1"
             android:layout_width= "wrap_content"
             android:layout_height= "wrap_content"
             android:layout_alignParentTop= "true"
             android:layout_centerHorizontal= "true"
             android:layout_marginTop= "30dp"
             android:text= "Large Text"
             android:textAppearance= "?android:attr/textAppearanceLarge"  />
         <CheckBox
             android:id= "@+id/checkBox1"
             android:layout_width= "wrap_content"
             android:layout_height= "wrap_content"
             android:layout_below= "@+id/textView1"
             android:layout_centerHorizontal= "true"
             android:layout_marginTop= "24dp"
             android:text= "CheckBox"  />
     </RelativeLayout>
</android.gesture.GestureOverlayView>




本文转自 glblong 51CTO博客,原文链接:http://blog.51cto.com/glblong/1228590,如需转载请自行联系原作者

目录
相关文章
|
2天前
|
Android开发 开发者
Android UI设计中,Theme定义了Activity的视觉风格,包括颜色、字体、窗口样式等,定义在`styles.xml`。
【6月更文挑战第26天】Android UI设计中,Theme定义了Activity的视觉风格,包括颜色、字体、窗口样式等,定义在`styles.xml`。要更改主题,首先在该文件中创建新主题,如`MyAppTheme`,覆盖所需属性。然后,在`AndroidManifest.xml`中应用主题至应用或特定Activity。运行时切换主题可通过重新设置并重启Activity实现,或使用`setTheme`和`recreate()`方法。这允许开发者定制界面并与品牌指南匹配,或提供多主题选项。
16 6
|
2天前
|
开发工具 Android开发 开发者
Android `.9.png` 图像是用于UI的可拉伸格式,保持元素清晰度和比例
【6月更文挑战第26天】Android `.9.png` 图像是用于UI的可拉伸格式,保持元素清晰度和比例。通过边上的黑线定义拉伸区域,右下角黑点标识内容区域,适应文本或组件大小变化。常用于按钮、背景等,确保跨屏幕尺寸显示质量。Android SDK 提供`draw9patch.bat`工具来创建和编辑。**
19 6
|
2天前
|
API Android开发 开发者
`RecyclerView`是Android API 21引入的UI组件,用于替代ListView和GridView
【6月更文挑战第26天】`RecyclerView`是Android API 21引入的UI组件,用于替代ListView和GridView。它提供高效的数据视图复用,优化的布局管理,支持多种布局(如线性、网格),并解耦数据、适配器和视图。RecyclerView的灵活性、性能(如局部刷新和动画支持)和扩展性使其成为现代Android开发的首选,特别是在处理大规模数据集时。
16 2
|
3天前
|
Android开发 开发者
Android UI中的Theme定义了Activity的视觉风格,包括颜色、字体、窗口样式等。要更改主题
【6月更文挑战第25天】Android UI中的Theme定义了Activity的视觉风格,包括颜色、字体、窗口样式等。要更改主题,首先在`styles.xml`中定义新主题,如`MyAppTheme`,然后在`AndroidManifest.xml`中设置`android:theme`。可应用于全局或特定Activity。运行时切换主题需重置Activity,如通过`setTheme()`和`recreate()`方法。这允许开发者定制界面以匹配品牌或用户偏好。
12 2
|
7天前
|
Android开发
Android 自定义View 测量控件宽高、自定义viewgroup测量
Android 自定义View 测量控件宽高、自定义viewgroup测量
9 0
|
21天前
|
XML Android开发 数据格式
【Android UI】使用RelativeLayout与TableLayout实现登录界面
【Android UI】使用RelativeLayout与TableLayout实现登录界面
27 5
|
21天前
|
XML IDE 开发工具
【Android UI】自定义带按钮的标题栏
【Android UI】自定义带按钮的标题栏
29 7
【Android UI】自定义带按钮的标题栏
|
21天前
|
XML Android开发 数据格式
【Android UI】中间对齐UI组件
【Android UI】中间对齐UI组件
13 1
|
24天前
|
API Apache C#
推荐2款开源、美观的WinForm UI控件库
推荐2款开源、美观的WinForm UI控件库
|
25天前
|
前端开发 API Android开发
25. 【Android教程】列表控件 ListView
25. 【Android教程】列表控件 ListView
25 2