Relative To Container These properties will layout elements relative to the parent container.
android:layout_alignParentBottom – Places the bottom of the element on the bottom of the container android:layout_alignParentLeft – Places the left of the element on the left side of the container android:layout_alignParentRight – Places the right of the element on the right side [...]
FrameLayout เป็นการดีไซน์ให้แสดงเพียงแต่หนึ่งอย่างภายใน Layout หากเรามี หลาย element อยู่ใน FrameLayout ทุก element จะแสดงซ้อนทับกัน (คล้าย Layer ใน PhotoShop) ที่ตำแหน่งเริ่มต้นจะอยู่ที่มุมบนซ้าย
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <ImageView android:src="@drawable/icon" android:scaleType="fitCenter" android:layout_height="fill_parent" android:layout_width="fill_parent"/> <TextView android:text="Learn-Android.com" android:textSize="24sp" android:textColor="#000000" android:layout_height="fill_parent" android:layout_width="fill_parent" android:gravity="center"/> </FrameLayout>
package com.benmccann.android.hello; import java.io.File; import java.io.IOException; import android.media.MediaRecorder; import android.os.Environment; /** * @author <a href=”http://www.benmccann.com”>Ben McCann</a> */ public class AudioRecorder { final MediaRecorder recorder = new MediaRecorder(); final String path; /** * Creates a new audio recording at the given path (relative to root of SD card). */ public AudioRecorder(String path) { this.path = [...]
Kemtid is community system to share travel experiences in Thailand. The system support users to watch interest trip, search another place in the system including display map and routing from user’s position to the searched place. Anyway users are interesting to share trip. Users can share by creating trip and upload picture including [...]