Android开发中的TextureView与ActionBar使用指南
1. TextureView的使用
在Android 4.0及更高版本的应用开发中,我们可以使用 TextureView 。它具有一些额外的属性,其中最实用的是可以进行变换。下面是使用 TextureView 的具体示例。
1.1 布局文件
在 res/layout/main.xml 中定义布局,包含一个旋转按钮和 TextureView :
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button_transform"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Rotate" />
<TextureView
android:id="@+id/surface"
android:layout_width="300dp"
超级会员免费看
订阅专栏 解锁全文
5557

被折叠的 条评论
为什么被折叠?



