不得不提一下ADT自带的手机截屏很方便,就在DDMS里可以找到。
main.xml
<?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" > <ListView android:id="@android:id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout>
newdiary.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="2dip" android:text="@string/new_Title" android:textColor="#FFFF00" /> <EditText android:id="@+id/text_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="2dip" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="2dip" android:text="@string/new_Body" android:textColor="#FFFF00" /> <EditText android:id="@+id/text_body" android:layout_width="fill_parent" android:layout_height="250dip" android:layout_marginBottom="2dip" android:gravity="top" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <Button android:id="@+id/new_save" android:layout_width="80dip" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="50dp" android:text="@string/new_saveButton" android:textSize="20dip" /> <Button android:id="@+id/new_cancel" android:layout_width="80dip" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginLeft="50dp" android:layout_toRightOf="@+id/new_save" android:text="@string/new_cancelButton" android:textSize="20dip" /> </RelativeLayout> </LinearLayout>
show_single_diary.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/transparent" android:orientation="vertical" > <TextView android:id="@+id/simple_text_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="@color/red" android:textSize="20sp" /> <TextView android:id="@+id/simple_text_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" android:textColor="@color/LightSlateGray" /> <TextView android:id="@+id/simple_text_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginBottom="1dip" android:textColor="@color/LightSlateGray" /> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/simple_text_body" android:layout_width="fill_parent" android:layout_height="250dip" android:layout_marginBottom="2dip" android:gravity="top" android:padding="1dip" android:textColor="@color/yellow" android:textSize="25sp" /> </ScrollView> </LinearLayout>
diary_item.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="match_parent"> <TextView android:id="@+id/item_id" android:layout_width="20dip" android:layout_height="wrap_content" android:gravity="center" android:visibility="gone" android:textColor="@color/red" android:layout_alignParentLeft="true" /> <TextView android:id="@+id/item_title" android:layout_width="100dip" android:layout_height="wrap_content" android:textSize="20sp" android:padding="1dip" android:layout_margin="1dip" android:gravity="center" android:textColor="@color/red" android:layout_alignParentLeft="true" android:maxLines="1" /> <TextView android:id="@+id/item_time" android:textSize="14sp" android:layout_margin="1dip" android:padding="3dip" android:textColor="@color/meadow_green" android:layout_width="80dip" android:gravity="center" android:layout_alignParentRight="true" android:layout_height="wrap_content" android:maxLines="1" /> </RelativeLayout> <TextView android:id="@+id/item_preRead" android:textSize="14sp" android:textColor="@color/LightSlateGray" android:layout_marginTop="2dip" android:padding="1dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:maxLines="1" android:paddingLeft="3dip" android:paddingRight="10dip" /> </LinearLayout>