mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Clickable folder icons in account lists to get to folder lists, even if
there's an auto-open folder
This commit is contained in:
parent
ba021597c4
commit
093d65513a
@ -7,6 +7,7 @@
|
||||
android:orientation="horizontal"
|
||||
android:paddingRight="6dip"
|
||||
android:paddingBottom="2dip"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<View
|
||||
@ -16,13 +17,31 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="1dip" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/folders"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="top"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/ic_show_folders"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="6dip" >
|
||||
android:paddingLeft="1dip" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
@ -43,7 +62,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/active_icons"
|
||||
android:layout_width="wrap_content"
|
||||
@ -73,6 +92,7 @@
|
||||
android:textColor="#000000"
|
||||
android:background="@drawable/btn_star_big_buttonless_on"
|
||||
android:clickable="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_message_count"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -795,6 +795,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
holder.activeIcons = (RelativeLayout) view.findViewById(R.id.active_icons);
|
||||
|
||||
holder.chip = view.findViewById(R.id.chip);
|
||||
holder.folders = (ImageButton) view.findViewById(R.id.folders);
|
||||
|
||||
view.setTag(holder);
|
||||
}
|
||||
@ -879,9 +880,29 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
holder.chip.setBackgroundColor(0x00000000);
|
||||
}
|
||||
|
||||
|
||||
holder.description.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getAccountName());
|
||||
holder.email.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getAccountDescription());
|
||||
|
||||
|
||||
if (account instanceof SearchAccount)
|
||||
{
|
||||
|
||||
holder.folders.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
holder.folders.setVisibility(View.VISIBLE);
|
||||
holder.folders.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
public void onClick(View v)
|
||||
{
|
||||
FolderList.actionHandleAccount(Accounts.this, (Account)account);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@ -893,6 +914,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
public TextView flaggedMessageCount;
|
||||
public RelativeLayout activeIcons;
|
||||
public View chip;
|
||||
public ImageButton folders;
|
||||
}
|
||||
}
|
||||
private Flag[] combine(Flag[] set1, Flag[] set2)
|
||||
|
Loading…
Reference in New Issue
Block a user