drawableRight = typedArray.getDrawable(R.styleable.DrawableTextView_rightDrawable); drawableTop...= null) { drawableRight.setBounds(0, 0, rightWidth, rightHeight); } if (drawableTop...= null) { drawableTop.setBounds(0, 0, topWidth, topHeight); } } @Override...) { this.drawableTop = drawableTop; invalidate(); } /** * 设置右侧图片并重绘...*/ public void setDrawableTop(int drawableTopRes) { this.drawableTop = mContext.getResources
drawableBottom" format="reference"/> <attr name="<em>drawableTop</em>...DrawableTextView extends android.support.v7.widget.AppCompatTextView { private Drawable drawableLeft = null, <em>drawableTop</em>...typedArray.getDrawable(attr); break; case R.styleable.DrawableTextView_<em>drawableTop</em>...: <em>drawableTop</em> = typedArray.getDrawable(attr); break;...= <em>drawableTop</em>){ <em>drawableTop</em>.setBounds(0,0, drawableWidth, drawableHeight); }
Button实现图文混排效果,具体内容如下 一、简介 本文介绍两种图文混排方式 1、android:drawableTop=”@drawable/star”实现文字上有图片 当然有上下左右等等 2、SpannableString...--android:drawableTop="@drawable/star"实现文字上有图片 -- <Button android:layout_width="wrap_content..." android:layout_height="wrap_content" android:text="一" android:drawableTop="@drawable...layout_width="wrap_content" android:layout_height="wrap_content" android:text="二" android:drawableTop
widget.AppCompatTextView android:layout_width="0dp" android:background="@android:color/holo_blue_light" android:drawableTop...widget.AppCompatTextView android:layout_width="0dp" android:background="@android:color/holo_green_light" android:drawableTop...widget.AppCompatTextView android:layout_width="0dp" android:background="@android:color/holo_red_light" android:drawableTop...widget.AppCompatTextView android:layout_width="0dp" android:background="@android:color/holo_purple" android:drawableTop
id/today_tab" style="@style/Custom.TabRadioButton" android:checked="true" android:drawableTop...RadioButton android:id="@+id/record_tab" style="@style/Custom.TabRadioButton" android:drawableTop...RadioButton android:id="@+id/contact_tab" style="@style/Custom.TabRadioButton" android:drawableTop...id/today_tab" style="@style/Custom.TabRadioButton" android:checked="true" android:drawableTop...RadioButton android:id="@+id/record_tab" style="@style/Custom.TabRadioButton" android:drawableTop
horizontal" android:layout_width="match_parent" android:layout_height="48dp" <RadioButton android:drawableTop...android:layout_weight="1" android:layout_height="match_parent" / <RadioButton android:drawableTop...android:layout_weight="1" android:layout_height="match_parent" / <RadioButton android:drawableTop...android:layout_weight="1" android:layout_height="match_parent" / <RadioButton android:drawableTop...drawableTop属性: <?xml version="1.0" encoding="utf-8"?
android:id="@+id/rbtn_home" style="@style/RadioButton" android:checked="true" android:drawableTop..."首页" / <RadioButton android:id="@+id/rbtn_vest" style="@style/RadioButton" android:drawableTop...投资" / <RadioButton android:id="@+id/rbtn_photo" style="@style/RadioButton" android:drawableTop..."拍拍" / <RadioButton android:id="@+id/rbtn_mine" style="@style/RadioButton" android:drawableTop..."我的" / <RadioButton android:id="@+id/rbtn_more" style="@style/RadioButton" android:drawableTop
android:id="@+id/rb_home" style="@style/RadioButtonStyle" android:checked="true" android:drawableTop...home" / <RadioButton android:id="@+id/rb_shop" style="@style/RadioButtonStyle" android:drawableTop...shop" / <RadioButton android:id="@+id/rb_live" style="@style/RadioButtonStyle" android:drawableTop...<RadioButton android:id="@+id/rb_shopping_car" style="@style/RadioButtonStyle" android:drawableTop...shopping_car" / <RadioButton android:id="@+id/rb_mine" style="@style/RadioButtonStyle" android:drawableTop
id="@+id/rb_main_tab_menu1" style="@style/rbt_bottom" android:checked="true" android:drawableTop...id="@+id/rb_main_tab_menu2" style="@style/rbt_bottom" android:checked="false" android:drawableTop...id="@+id/rb_main_tab_menu3" style="@style/rbt_bottom" android:checked="false" android:drawableTop...layout_width="0dp" android:layout_height="fill_parent" android:checked="true" android:drawableTop...white" android:text="@string/My"/ </RadioGroup </RelativeLayout 注意一下,radiobutton中的一个属性是 drawableTop
RadioButton android:id="@+id/radio_button0" style="@style/tab_bar_item" android:checked="true" android:drawableTop...android:text="首页" / <RadioButton android:id="@+id/radio_button1" style="@style/tab_bar_item" android:drawableTop...--android:drawableTop="@drawable/icon_selfinfo"-- <!...android:text="好友"-- <RadioButton android:id="@+id/radio_button3" style="@style/tab_bar_item" android:drawableTop...android:text="广场" / <RadioButton android:id="@+id/radio_button4" style="@style/tab_bar_item" android:drawableTop
android:attr/selectableItemBackgroundBorderless" android:drawableTop="@mipmap/ic_user_paid...android:attr/selectableItemBackgroundBorderless" android:drawableTop="@mipmap/ic_user_paid...android:attr/selectableItemBackgroundBorderless" android:drawableTop="@mipmap/ic_user_paid...android:attr/selectableItemBackgroundBorderless" android:drawableTop="@mipmap/ic_user_paid
android:button="@null" android:layout_weight="1" android:text="微信" android:drawableTop...android:button="@null" android:layout_weight="1" android:text="通讯录" android:drawableTop...android:button="@null" android:layout_weight="1" android:text="发现" android:drawableTop...android:button="@null" android:layout_weight="1" android:text="我的" android:drawableTop
layout_weight="1" android:button="@null" android:checked="true" android:drawableTop...layout_weight="1" android:background="@null" android:button="@null" android:drawableTop...layout_weight="1" android:background="@null" android:button="@null" android:drawableTop...layout_weight="1" android:background="@null" android:button="@null" android:drawableTop...layout_weight="1" android:button="@null" android:checked="true" android:drawableTop
android:id="@+id/main_rbtnChannel" style="@style/TabMenuItem" android:drawableTop...android:id="@+id/main_rbtnMessage" style="@style/TabMenuItem" android:drawableTop...android:id="@+id/main_rbtnMy" style="@style/TabMenuItem" android:drawableTop...android:id="@+id/main_rbtnMore" style="@style/TabMenuItem" android:drawableTop
main_home" android:checked="true" android:id="@+id/radio_button0" android:layout_marginTop="2.0dip" android:drawableTop...:id="@+id/radio_button1" android:layout_marginTop="2.0dip" android:text="@string/main_news" android:drawableTop...="@+id/radio_button2" android:layout_marginTop="2.0dip" android:text="@string/main_my_info" android:drawableTop...id="@+id/radio_button3" android:layout_marginTop="2.0dip" android:text="@string/menu_search" android:drawableTop...android:id="@+id/radio_button4" android:layout_marginTop="2.0dip" android:text="@string/more" android:drawableTop
layout_marginTop="2.0dip" 31 android:text="@string/alarm" 32 android:drawableTop...layout_marginTop="2.0dip" 38 android:text="@string/message" 39 android:drawableTop...layout_marginTop="2.0dip" 45 android:text="@string/photo" 46 android:drawableTop...layout_marginTop="2.0dip" 52 android:text="@string/music" 53 android:drawableTop...layout_marginTop="2.0dip" 59 android:text="@string/setting" 60 android:drawableTop
#07c563" android:state_checked="true" /> 给 RadioButton设置 drawableTop...android:checked="true" android:textColor="@drawable/tab_text_selector" android:drawableTop...android:button="@null" android:textColor="@drawable/tab_text_selector" android:drawableTop...android:button="@null" android:textColor="@drawable/tab_text_selector" android:drawableTop...android:button="@null" android:textColor="@drawable/tab_text_selector" android:drawableTop
style="@style/Icon" android:layout_centerInParent="true" android:drawableTop...layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:drawableTop...layout_alignParentRight="true" android:layout_centerVertical="true" android:drawableTop...style="@style/Icon" android:layout_centerHorizontal="true" android:drawableTop...layout_alignParentLeft="true" android:layout_centerVertical="true" android:drawableTop
gravity="center" android:background="#FDFDFD" > <RadioButton android:drawableTop..." android:id="@+id/rb_wallet" /> <RadioButton android:drawableTop...android:id="@+id/rb_treasure" /> <RadioButton android:drawableTop...main_rb_style" android:id="@+id/rb_home" /> <RadioButton android:drawableTop...main_rb_style" android:id="@+id/rb_otc" /> <RadioButton android:drawableTop
android:id="@id/btn_share_weixin" android:layout_width="0dp" android:layout_weight="1" android:drawableTop...android:id="@id/btn_share_friends" android:layout_width="0dp" android:layout_weight="1" android:drawableTop...android:id="@id/btn_share_qq" android:layout_width="0dp" android:layout_weight="1" android:drawableTop...android:id="@id/btn_share_qq_zone" android:layout_width="0dp" android:layout_weight="1" android:drawableTop
领取专属 10元无门槛券
手把手带您无忧上云