Commit 5efc08f0 authored by Grigory Fedorov's avatar Grigory Fedorov

New group offline contacts icon. contact and group layouts corrected.

parent bbe60ac6
......@@ -171,10 +171,10 @@ public abstract class GroupedContactAdapter<Inflater extends BaseContactInflater
view.setElevation(elevation);
}
viewHolder.name.getBackground().setLevel(configuration.getShowOfflineMode().ordinal());
viewHolder.name.setText(name + " (" + configuration.getOnline()
+ "/" + configuration.getTotal() + ")");
viewHolder.indicator.setImageLevel(configuration.isExpanded() ? 1 : 0);
viewHolder.groupOfflineIndicator.setImageLevel(configuration.getShowOfflineMode().ordinal());
return view;
} else {
throw new IllegalStateException();
......@@ -381,10 +381,12 @@ public abstract class GroupedContactAdapter<Inflater extends BaseContactInflater
private static class GroupViewHolder {
final ImageView indicator;
final TextView name;
final ImageView groupOfflineIndicator;
public GroupViewHolder(View view) {
indicator = (ImageView) view.findViewById(R.id.indicator);
name = (TextView) view.findViewById(R.id.name);
groupOfflineIndicator = (ImageView) view.findViewById(R.id.group_offline_indicator);
}
}
......
......@@ -14,7 +14,7 @@
-->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/ic_show_offline_never"
android:drawable="@drawable/ic_show_offline_never_18dp"
android:minLevel="0"
android:maxLevel="0" />
<item
......@@ -22,7 +22,7 @@
android:minLevel="1"
android:maxLevel="1" />
<item
android:drawable="@drawable/ic_show_offline_always"
android:drawable="@drawable/ic_show_offline_always_18dp"
android:minLevel="2"
android:maxLevel="2" />
</level-list>
\ No newline at end of file
......@@ -90,7 +90,7 @@
/>
<ImageView
android:id="@+id/status_icon"
android:layout_width="@dimen/status_icon_width"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
......
......@@ -16,8 +16,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/expander_height"
android:gravity="center_vertical|start"
android:paddingRight="@dimen/active_chat_padding_right"
android:paddingEnd="@dimen/active_chat_padding_right"
>
<ImageView
android:id="@+id/indicator"
android:layout_width="wrap_content"
......@@ -26,18 +28,29 @@
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageView
android:id="@+id/group_offline_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_show_offline"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:alpha="0.2"
/>
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="@dimen/expander_height"
android:gravity="center_vertical"
android:layout_marginRight="@dimen/expander_text_margin_right"
android:layout_marginEnd="@dimen/expander_text_margin_right"
android:singleLine="true"
android:ellipsize="marquee"
android:background="@drawable/ic_show_offline"
android:text="name (0/0)"
android:layout_toRightOf="@id/indicator"
android:layout_toEndOf="@id/indicator"
android:layout_toLeftOf="@id/group_offline_indicator"
android:layout_toStartOf="@id/group_offline_indicator"
/>
</RelativeLayout>
\ No newline at end of file
......@@ -117,7 +117,7 @@
<dimen name="active_chat_padding_left">10dip</dimen>
<dimen name="active_chat_padding_top">0dip</dimen>
<dimen name="active_chat_padding_right">10dip</dimen>
<dimen name="active_chat_padding_right">16dip</dimen>
<dimen name="active_chat_padding_bottom">0dip</dimen>
<dimen name="client_software_margin_left">34dip</dimen>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment