SORU
21 Mart 2012, ÇARŞAMBA


Nasıl Holo Tema stili iletişim kutusu düğmeleri Android

Holo Temalı bir İletişim Kutusu yaratıyorum ve düğmeleri görüntüleme OS varsayılan yolu takip etmek istiyorum. Şimdiye kadar iletişim kutusu oluşturdum ama düğmeleri apps ICS Holo benim yaptığım gibi render yok. Bunu nasıl yapabilirim? Bu amaçlanan bak & hissediyorum. No. 3rd in this image ve buraya kadar ulaşmak mümkün duyuyorum Notice the Signup and Login buttons

CEVAP
23 Temmuz 2012, PAZARTESİ


biraz geç oldu ama belki birileri hala ilgileniyor.

bu benim için oldukça iyi çalışıyor.

...
<!--
EDIT: be carefull, "?android:attr/dividerHorizontal" is only supported since API 11
      just avoid it in prior OSs.
-->
<View
    android:layout_width="fill_parent"
    android:layout_height="1dip"
    android:background="?android:attr/dividerHorizontal" />
<LinearLayout 
    style="?android:attr/buttonBarStyle"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:paddingTop="0dip"
    android:paddingLeft="2dip"
    android:paddingRight="2dip"
    android:measureWithLargestChild="true">

    <Button 
        android:id="@ id/cancel"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@android:string/cancel"/>
    <Button 
        android:id="@ id/ok"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@android:string/ok"/>
</LinearLayout>
...

yükleyen aktivite bu düzen Holo ihtiyacı var.İletişim tema.

android:theme="@android:style/Theme.Holo.Dialog"

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • CNET

    CNET

    5 Mayıs 2006
  • MADFINGER Games a.s.

    MADFINGER Ga

    21 NİSAN 2009
  • Moto Journal

    Moto Journal

    28 Mayıs 2007