1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Change layout of the email address list.

set title to the contact name.
change text size is medium from default(Large).
This commit is contained in:
Koji Arai 2011-10-02 02:16:35 +09:00 committed by Jesse Vincent
parent 3a9589714b
commit 6861c813ea
5 changed files with 15 additions and 8 deletions

View File

@ -281,7 +281,7 @@
android:name="com.fsck.k9.activity.AccessibleEmailContentActivity"
>
</activity>
<activity android:name="com.fsck.k9.activity.ArrayItemList"
<activity android:name="com.fsck.k9.activity.EmailAddressList"
android:configChanges="locale"
>
</activity>

View File

@ -0,0 +1,9 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:minHeight="?android:attr/listPreferredItemHeight"
/>

View File

@ -1,7 +1,5 @@
package com.fsck.k9.activity;
import java.util.ArrayList;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
@ -14,12 +12,12 @@ import android.widget.AdapterView.OnItemClickListener;
import com.fsck.k9.R;
import com.fsck.k9.helper.ContactItem;
public class ArrayItemList extends K9ListActivity implements OnItemClickListener {
public class EmailAddressList extends K9ListActivity implements OnItemClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.item_list);
setContentView(R.layout.email_address_list);
Intent i = getIntent();
ContactItem contact = (ContactItem) i.getSerializableExtra("contact");
@ -27,7 +25,7 @@ public class ArrayItemList extends K9ListActivity implements OnItemClickListener
return;
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, contact.getEmailAddresses());
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.email_address_list_item, contact.getEmailAddresses());
ListView listView = getListView();
listView.setOnItemClickListener(this);
@ -39,7 +37,7 @@ public class ArrayItemList extends K9ListActivity implements OnItemClickListener
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String item = (String)parent.getItemAtPosition(position);
Toast.makeText(ArrayItemList.this, item, Toast.LENGTH_LONG).show();
Toast.makeText(EmailAddressList.this, item, Toast.LENGTH_LONG).show();
Intent intent = new Intent();
intent.putExtra("EMAIL_ADDRESS", item);

View File

@ -1803,7 +1803,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
return;
}
if (contact.getEmailAddresses().size() > 1) {
Intent i = new Intent(this, ArrayItemList.class);
Intent i = new Intent(this, EmailAddressList.class);
i.putExtra("contact", contact);
if (requestCode == CONTACT_PICKER_TO) {