Thứ Ba, 29 tháng 1, 2013

Sử dụng relative layout
khi sử dụng relative layout thì sẽ có thêm các thuộc tính hay dùng như
android:layout_toRightof("[id của button]"); đặt ở bên phải
android:layout_marginLeft="40dp"; cách bên trái 40dp


<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="10dp" >

        <TextView
            android:id="@+id/tvTemperature"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/temp" />

        <TextView
            android:id="@+id/tvHumidity"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@id/tvTemperature"
            android:text="@string/hum"
            android:layout_marginLeft="40dp" />

        <TextView
            android:id="@+id/tvCondition"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@id/tvHumidity"
            android:text="@string/cond"
            android:layout_marginLeft="40dp"/>
    </RelativeLayout>

scr:https://www.youtube.com/watch?v=gCsyiHjP1P0

set dialog in android

Vào file Android manifest thêm element Android:Them="@android:style/Theme.Dialog";


<activity
            android:name=".Setting"
            android:label="@string/title_activity_weather"
            android:theme="@android:style/Theme.Dialog" >
            <intent-filter>
                <action android:name="ssas.Androi.SETTING" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

src: https://www.youtube.com/watch?v=CqE0VZXh_kI

Thứ Hai, 28 tháng 1, 2013

Chỉ là giấc mơ

Nothing

Một giấc mơ mà ta không muốn gặp trong giấc nồng....
Cái gì qua rùi hãy để cho nó ngủ yên, chôn thật sâu, tiếp tục với những khó khăn đang chờ ta phía trước, khi ko còn đường quay lại quá khứ....
Ngày tháng này thấy thật bận rộn, làm ta quay cuồng trong công việc,