永发信息网

Android中<item type="id" name="textMarketPrice">false</item>的含义

答案:1  悬赏:80  手机版
解决时间 2021-02-06 23:47
  • 提问者网友:niaiwoma
  • 2021-02-06 07:40
为什么中间要加上false呢?
最佳答案
  • 五星知识达人网友:渡鹤影
  • 2021-02-06 09:19
<item name="textMarketPrice">false</item>
应该是这样的吧。
这应该是一个Bool类型的Resource, false是他的值。

比如
 <bool name="adjust_view_bounds">true</bool>

那就可以在xml中这样用

<ImageView
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    android:src="@drawable/logo"
    android:adjustViewBounds="@bool/adjust_view_bounds" />java里是 
Resources res = getResources();
boolean screenIsSmall = res.getBoolean(R.bool.adjust_view_bounds);
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯