手机信息页面

新建photoInfo项目,新建tablelayout_demo.xml,将素材图片复制进drawable这里写图片描述这里写图片描述这里写图片描述这里写图片描述这里写图片描述
完整代码:

<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray"//背景颜色
android:orientation="vertical"//垂直分布
tools:context=".MainActivity">

<RelativeLayout
style="@style/h_wrap_content"
android:layout_marginTop="10dp">

<TextView
style="@style/ty_style"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:drawableTop="@drawable/clound"
android:gravity="center"
android:text="cloud" />

<TextView
style="@style/ty_style"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:drawableTop="@drawable/bluetooth"
android:gravity="center"
android:text="bluetooth" />
</RelativeLayout>

<RelativeLayout
style="@style/h_wrap_content"
android:layout_marginTop="10dp">

<TextView
style="@style/ty_style"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:drawableTop="@drawable/gesture"
android:gravity="center"
android:text="gesture" />

<TextView
style="@style/ty_style"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:drawableTop="@drawable/gps"
android:gravity="center"
android:text="gps" />
</RelativeLayout>

<RelativeLayout
style="@style/h_wrap_content"
android:layout_marginTop="10dp">

<TextView
style="@style/ty_style"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:drawableTop="@drawable/theme"
android:gravity="center"
android:text="theme" />

<TextView
style="@style/ty_style"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:drawableTop="@drawable/internet"
android:gravity="center"
android:text="internet" />
</RelativeLayout>

<RelativeLayout
style="@style/h_wrap_content"
android:layout_marginTop="10dp">

<TextView
style="@style/ty_style"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:drawableTop="@drawable/language"
android:gravity="center"
android:text="language" />

<TextView
style="@style/ty_style"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:drawableTop="@drawable/notifycation"
android:gravity="center"
android:text="notifycation" />
</RelativeLayout>


</LinearLayout>
Styles 文件内容
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="h_wrap_content">h_wrap_content
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="ty_style">

<item name="android:layout_width">180dp</item>
<item name="android:layout_height">110dp</item>
<item name="android:layout_gravity">center</item>
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:drawablePadding">5dp</item>
<item name="android:background">@android:color/white</item>
</style>




</resources>
<resources>
<string name="app_name">phoneInfo</string>
<string name="menu_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="_cloud">Cloud</string>
<string name="_bluetooth">Bluetooth</string>
<string name="_gesture">Gesture</string>
<string name="_gps">Gps</string>
<string name="_system_info">SystemInfo</string>
<string name="_internet">Internet</string>
<string name="_language">Language</string>
<string name="_set_notifycation">Notifycation</string>

</resources>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值