Sun*_*iel 7 android imagebutton
我有一个看起来像这样的ImageButton.
<ImageButton
android:id="@+id/ImageButton"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:layout_marginBottom="6px"
android:layout_marginRight="3px"
android:layout_toRightOf="@+id/Logo"
android:background="@drawable/button_bg_purple"
android:scaleType="fitStart"
android:src="@drawable/ImageButton" />
ImageButton ImgButton= (ImageButton) this.findViewById(R.id.ImageButton);
Run Code Online (Sandbox Code Playgroud)
现在我需要以编程方式在ImageButton中添加动态文本,我不能使用按钮.我该怎么做?
提前致谢 ...
nit*_*esh 13
ImageButton 不能包含文字:
您可以尝试的选项
1)使用Button而不是ImageButton
2)使用ImageButton及TextView以下显示文字
希望这可以帮助
| 归档时间: |
|
| 查看次数: |
32739 次 |
| 最近记录: |