fixed regression where the selected conversation wasn't highlighted anymore on tabled layout
This commit is contained in:
parent
37d08276a8
commit
845b39cdcc
|
@ -90,6 +90,7 @@ public abstract class XmppActivity extends Activity {
|
||||||
|
|
||||||
protected int mPrimaryTextColor;
|
protected int mPrimaryTextColor;
|
||||||
protected int mSecondaryTextColor;
|
protected int mSecondaryTextColor;
|
||||||
|
protected int mPrimaryBackgroundColor;
|
||||||
protected int mSecondaryBackgroundColor;
|
protected int mSecondaryBackgroundColor;
|
||||||
protected int mColorRed;
|
protected int mColorRed;
|
||||||
protected int mColorOrange;
|
protected int mColorOrange;
|
||||||
|
@ -331,6 +332,7 @@ public abstract class XmppActivity extends Activity {
|
||||||
mColorOrange = getResources().getColor(R.color.orange);
|
mColorOrange = getResources().getColor(R.color.orange);
|
||||||
mColorGreen = getResources().getColor(R.color.green);
|
mColorGreen = getResources().getColor(R.color.green);
|
||||||
mPrimaryColor = getResources().getColor(R.color.primary);
|
mPrimaryColor = getResources().getColor(R.color.primary);
|
||||||
|
mPrimaryBackgroundColor = getResources().getColor(R.color.primarybackground);
|
||||||
mSecondaryBackgroundColor = getResources().getColor(R.color.secondarybackground);
|
mSecondaryBackgroundColor = getResources().getColor(R.color.secondarybackground);
|
||||||
this.mTheme = findTheme();
|
this.mTheme = findTheme();
|
||||||
setTheme(this.mTheme);
|
setTheme(this.mTheme);
|
||||||
|
@ -740,7 +742,11 @@ public abstract class XmppActivity extends Activity {
|
||||||
public int getOnlineColor() {
|
public int getOnlineColor() {
|
||||||
return this.mColorGreen;
|
return this.mColorGreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPrimaryBackgroundColor() {
|
||||||
|
return this.mPrimaryBackgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
public int getSecondaryBackgroundColor() {
|
public int getSecondaryBackgroundColor() {
|
||||||
return this.mSecondaryBackgroundColor;
|
return this.mSecondaryBackgroundColor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,17 +46,10 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
|
||||||
}
|
}
|
||||||
Conversation conversation = getItem(position);
|
Conversation conversation = getItem(position);
|
||||||
if (this.activity instanceof ConversationActivity) {
|
if (this.activity instanceof ConversationActivity) {
|
||||||
ConversationActivity activity = (ConversationActivity) this.activity;
|
View swipeableItem = view.findViewById(R.id.swipeable_item);
|
||||||
if (!activity.isConversationsOverviewHideable()) {
|
ConversationActivity a = (ConversationActivity) this.activity;
|
||||||
if (conversation == activity.getSelectedConversation()) {
|
int c = !a.isConversationsOverviewHideable() && conversation == a.getSelectedConversation() ? a.getSecondaryBackgroundColor() : a.getPrimaryBackgroundColor();
|
||||||
view.setBackgroundColor(activity
|
swipeableItem.setBackgroundColor(c);
|
||||||
.getSecondaryBackgroundColor());
|
|
||||||
} else {
|
|
||||||
view.setBackgroundColor(Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
view.setBackgroundColor(Color.TRANSPARENT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
|
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
|
||||||
if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
|
if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:background="@color/divider"/>
|
android:background="@color/primary"/>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/swipeable_item"
|
android:id="@+id/swipeable_item"
|
||||||
|
|
Loading…
Reference in a new issue