1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

move the chips, change the sizes

This commit is contained in:
Jesse Vincent 2012-03-23 22:00:53 -04:00 committed by cketti
parent 580f1639c3
commit ea90e24785
3 changed files with 9 additions and 13 deletions

View File

@ -6,6 +6,10 @@
android:orientation="horizontal"
android:background="#cccccc"
android:gravity="left|center_vertical">
<View
android:id="@+id/chip"
android:layout_height="fill_parent"
android:layout_width="6dp"/>
<TextView
android:id="@+id/name"
@ -13,11 +17,11 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="2dp"
android:paddingTop="8dp"
android:paddingLeft="18dp"
android:paddingRight="4dp"
android:paddingBottom="2dp"
android:paddingBottom="8dp"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>

View File

@ -7,10 +7,6 @@
android:orientation="horizontal"
android:gravity="center_vertical">
<View
android:id="@+id/chip"
android:layout_height="fill_parent"
android:layout_width="6dp"/>
<LinearLayout
android:layout_width="wrap_content"
@ -27,7 +23,7 @@
android:singleLine="true"
android:ellipsize="end"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceMedium"/>
android:textAppearance="?android:attr/textAppearanceSmall"/>
<TextView
android:id="@+id/description"

View File

@ -3263,6 +3263,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
Account account = (Account) item;
TextView name = (TextView) view.getTag();
name.setText(account.getDescription());
view.findViewById(R.id.chip).setBackgroundColor(account.getChipColor());
} else if (item instanceof IdentityContainer) {
if (convertView != null && convertView.getTag() instanceof IdentityHolder) {
view = convertView;
@ -3270,10 +3271,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
view = mLayoutInflater.inflate(R.layout.choose_identity_item, parent, false);
IdentityHolder holder = new IdentityHolder();
holder.name = (TextView) view.findViewById(R.id.name);
holder.name.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getAccountName());
holder.description = (TextView) view.findViewById(R.id.description);
holder.description.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getAccountDescription());
holder.chip = view.findViewById(R.id.chip);
view.setTag(holder);
}
@ -3283,7 +3281,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
IdentityHolder holder = (IdentityHolder) view.getTag();
holder.name.setText(identity.getDescription());
holder.description.setText(getIdentityDescription(identity));
holder.chip.setBackgroundColor(account.getChipColor());
}
return view;
@ -3292,7 +3289,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
static class IdentityHolder {
public TextView name;
public TextView description;
public View chip;
}
}