SORU
9 Mart 2011, ÇARŞAMBA


Görüntü üzerinde Android Metin

Bir görüntü ile bir imageView var, o resmin üzerine bir metin yerleştirmek istiyorum. Bunu nasıl elde edebilirsiniz?

CEVAP
25 Kasım 2011, Cuma


Ben de öyle yapmıştım ve istediğin şekilde çalıştı:

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@ id/relativelayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <ImageView
        android:id="@ id/myImageView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/myImageSouce" />

    <TextView
        android:id="@ id/myImageViewText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@id/myImageView"
        android:layout_alignTop="@id/myImageView"
        android:layout_alignRight="@id/myImageView"
        android:layout_alignBottom="@id/myImageView"
        android:layout_margin="1dp"
        android:gravity="center"
        android:text="Hello"
        android:textColor="#000000" />

</RelativeLayout>

PS: bir RelativeLayout içinde çalışır

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • My name is Festis and I'm free

    My name is F

    2 EKİM 2011
  • H3Ctic (old channel)

    H3Ctic (old

    23 Mart 2011
  • SuicideSheeep

    SuicideSheee

    8 Ocak 2012