<Button android:id="@+id/AdultLeft1"
android:layout_width="40dip" android:text="@layout/active"
android:layout_marginTop="110dip" android:layout_height="wrap_content"
android:background="@drawable/notselectedtabright_landscape"
android:focusable="false"/>
和active.xml
如何在Android中爲按鈕設置自定義文本?
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.xxx.VerticalTextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/black"
android:textStyle="bold"android:textSize="12dip"
android:text="Closed\nCases"/>
</RelativeLayout>
我有一個自定義VerticalTextView
。我想在xml中將此文本設置爲我的按鈕。這是如何完成的?
檢查'/res/values/strings.xml '文件。並請詳細解釋您確切想要達到的目標。 – Ghost 2012-02-09 06:15:41
需要更多描述。 :) – 2012-02-09 06:17:40
其實我在這裏發佈的代碼其不顯示我的代碼 – 2012-02-09 06:21:52