comment puis-je trouver les paramètres de mise en page du widget de pain grillé?
-
26-09-2019 - |
Question
Je aime la mise en page du toast
widget de beaucoup, cela signifie coins arrondis, la transparence, frontière gris clair. Est-il possible de voir les paramètres de mise en page de ces widgets Android standard comme le toast
?
Je voudrais do définir un TextView
avec les mêmes paramètres de mise en page.
La solution
La mise en page se trouve sous {SDKBASEDIR} / plates-formes / {} RELEASE /res/layout/transient_notification.xml
par exemple. pour 2.1:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/toast_frame">
<TextView
android:id="@android:id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="@style/TextAppearance.Small"
android:textColor="@color/bright_foreground_dark"
android:shadowColor="#BB000000"
android:shadowRadius="2.75"
/>
</LinearLayout>
Le toast_frame.9.png drawable se trouve sous {SDKBASEDIR} / plates-formes / {} RELEASE / res / drawable {} -résolution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow