Ich möchte einen schwarzen schwarzen Text innerhalb einer Schaltfläche hinzufügen. Ich kann herausfinden, dies mit normalem Textview zu tun, aber nicht, wenn es um einen Button geht.Xml: Strich, Rahmen, Umriss Text innerhalb der Schaltfläche
Thi bezieht sich auf Xml Android Studio BTW.
activity_main.xml:
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:background="@drawable/login_button_style"
android:text="Log Ind"
android:id="@+id/button"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="@+id/editTextPass"
android:layout_alignEnd="@+id/editTextPass"
android:clickable="true" /><![CDATA[
/>
login_button_style.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#d7d7d7"/>
<corners
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp"/>
<stroke android:color="#d10f0f" android:width="3dp" />
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="shadoweffect">
<item name="android:paddingLeft">4px</item>
<item name="android:paddingBottom">4px</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:textSize">25sp</item>
<item name="android:shadowColor">#000000</item>
<item name="android:shadowDx">0</item>
<item name="android:shadowDy">0</item>
<item name="android:shadowRadius">3</item>
</style>
</resources>
kann mir bitte jemand aufklären?
Ihren Code und Ihr Bild über das, was Sie genau wollen und was passiert, eingeben. –
gibt es kein Bild. Wir sprechen über eine normale Schaltfläche in Android Studio, der einen Rahmen zum darin enthaltenen Text hinzufügen soll. – Nulle
möchten Sie Knopfleiste oder nur die Textgrenze? –