SmallActivity创建
16lz
2021-01-23
SmallActivity创建的时候要做特殊调整
在配置文件中调整ctivity的主题为:
android:theme="@android:style/Theme.Translucent.NoTitleBar"
在布局文件中调整
把根节点调整大小为下面的大小,
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#207044"
tools:context=".SmallActivity" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="SmallActivity"
android:textSize="30sp" />
</RelativeLayout>
在配置文件中调整ctivity的主题为:
android:theme="@android:style/Theme.Translucent.NoTitleBar"
在布局文件中调整
把根节点调整大小为下面的大小,
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#207044"
tools:context=".SmallActivity" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="SmallActivity"
android:textSize="30sp" />
</RelativeLayout>
更多相关文章
- 关于Android设备屏幕大小及密度的系统参数类
- Android MTK 修改默认音频和声音大小
- android 获取文件夹、文件的大小 以B、KB、MB、GB 为单位
- Android下获取手机屏幕大小
- android webview字体大小的控制
- Android开发:设置widget大小为 4x1
- android imageView 自适应大小
- Android TextView 一些字体颜色、大小设置属性
- Android Studio设置界面风格和字体大小