Feb082011

Android programlama ile ilgili yararlı bilgiler

Published by admin at 1:11 AM under

Ekrana background resmi ekleme

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/bbg">
<Button android:text="@+id/Button01"
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>

Font örnekler

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
        >
    <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="This is a 'sans' demo!"
            android:typeface="sans"
            />
     <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="This is a 'serif' demo!"
            android:typeface="serif"
            />
     <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="This is a 'monospace' demo!"
            android:typeface="monospace"
            />

</LinearLayout>

Text Style değiştirme

<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is bold!"
        android:textStyle="bold"
        />

Text Size Değiştirme

<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="15sp is the 'normal' size."
        android:textSize="15sp"
        />

Text Color Değiştirme

    <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="A light blue color."
            android:textColor="#00ccff"
            />

 

Text Shadow gölgeli yazı yazmak

<TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="A light blue shadow."
            android:shadowColor="#00ccff"
            android:shadowRadius="1.5"
            android:shadowDx="1"
            android:shadowDy="1"
            />



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses