安卓:设置视图样式编程 [英] Android: set view style programatically

查看:111
本文介绍了安卓:设置视图样式编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的XML:

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/LightStyle"
    android:layout_width="fill_parent"
    android:layout_height="55dip"
    android:clickable="true"
    android:orientation="horizontal" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal" />

</RelativeLayout>

如何编程设置参数的风格?

How to set param style programmatically?

推荐答案

不可以设置视图的风格编程,但你可能会发现的这个线程有用的。

You cannot set a view's style programmatically yet, but you may find this thread useful.

这篇关于安卓:设置视图样式编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆