UI improvement

Add icons from Android4 for adding user or group
This commit is contained in:
Mathieu Maret 2012-10-03 11:00:58 +02:00
parent 6100d8a757
commit 8c0decf6e8
12 changed files with 44 additions and 4 deletions

BIN
res/drawable-hdpi/accept.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
res/drawable-hdpi/add_group.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
res/drawable-hdpi/add_person.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
res/drawable-mdpi/accept.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
res/drawable-mdpi/add_group.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
res/drawable-mdpi/add_person.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
res/drawable-xhdpi/accept.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/drawable-xhdpi/add_group.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
res/drawable-xhdpi/add_person.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -6,12 +6,20 @@
android:layout_gravity="center_vertical" android:gravity="center_horizontal"
android:orientation="horizontal" android:layout_width="fill_parent">
<Button android:background="@drawable/ic_launcher_contacts"
<LinearLayout android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical" android:layout_width="wrap_content">
<Button android:background="@drawable/add_person"
android:id="@+id/contacts" android:layout_height="wrap_content"
android:layout_width="wrap_content"></Button>
android:layout_width="wrap_content" android:paddingRight="2dp"></Button>
<Button android:background="@drawable/add_group"
android:id="@+id/groups" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:paddingRight="2dp"></Button>
</LinearLayout>
<EditText android:id="@+id/numbers" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:hint="@string/to"
android:layout_width="fill_parent" android:hint="@string/to" android:lines="2"
android:maxLines="2" />
</LinearLayout>

View File

@ -2,7 +2,30 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical">
<Button android:text="@string/ok" android:id="@+id/okContacts" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="#837d7d">
<Button
android:id="@+id/okContacts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/accept"
android:text="@string/ok"
android:background="#837d7d"
android:textColor="#FFFFFF"
android:paddingRight="10dp"
>
</Button>
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="1dp"
android:background="#EEEEEE" >
</LinearLayout>
</LinearLayout>
<ListView android:id="@+id/android:list" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:choiceMode="multipleChoice" android:fillViewport="true" />
<TextView android:id="@+id/android:empty"

View File

@ -31,6 +31,7 @@ import android.widget.TextView;
public class MultiSmsSender extends Activity {
private Button mAddButton;
private Button mAddGroupButton;
private Button mSend;
private TextView mContacts;
private TextView mEditor;
@ -166,6 +167,7 @@ public class MultiSmsSender extends Activity {
mAddButton = (Button) findViewById(R.id.contacts);
mAddGroupButton = (Button)findViewById(R.id.groups);
mSend = (Button) findViewById(R.id.send);
mContacts = (TextView) findViewById(R.id.numbers);
mEditor = (TextView) findViewById(R.id.editor);
@ -182,6 +184,13 @@ public class MultiSmsSender extends Activity {
}
});
mAddGroupButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
display_group_list();
}
});
mSend.setOnClickListener(new OnClickListener() {
public void onClick(View v) {