Merge branch 'tablet'
This commit is contained in:
commit
7738bfd072
|
@ -2,6 +2,6 @@
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
<gradient
|
<gradient
|
||||||
android:endColor="#cccccc"
|
android:endColor="#cccccc"
|
||||||
android:startColor="#eeeeee" />
|
android:startColor="#00000000" />
|
||||||
<size android:width="3.0dp" android:height="0.5dp" />
|
<size android:width="3.0dp" android:height="0.5dp" />
|
||||||
</shape>
|
</shape>
|
|
@ -19,6 +19,7 @@ import android.app.NotificationManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.support.v4.widget.SlidingPaneLayout;
|
import android.support.v4.widget.SlidingPaneLayout;
|
||||||
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
|
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
|
||||||
|
@ -29,7 +30,6 @@ import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
@ -148,6 +148,13 @@ public class ConversationActivity extends XmppActivity {
|
||||||
R.layout.conversation_list_row, null);
|
R.layout.conversation_list_row, null);
|
||||||
}
|
}
|
||||||
Conversation conv = getItem(position);
|
Conversation conv = getItem(position);
|
||||||
|
if (!spl.isSlideable()) {
|
||||||
|
if (conv==getSelectedConversation()) {
|
||||||
|
view.setBackgroundColor(0xffdddddd);
|
||||||
|
} else {
|
||||||
|
view.setBackgroundColor(Color.TRANSPARENT);
|
||||||
|
}
|
||||||
|
}
|
||||||
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
|
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
|
||||||
convName.setText(conv.getName());
|
convName.setText(conv.getName());
|
||||||
TextView convLastMsg = (TextView) view.findViewById(R.id.conversation_lastmsg);
|
TextView convLastMsg = (TextView) view.findViewById(R.id.conversation_lastmsg);
|
||||||
|
@ -241,13 +248,13 @@ public class ConversationActivity extends XmppActivity {
|
||||||
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
|
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
|
||||||
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
|
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
|
||||||
|
|
||||||
if (spl.isOpen()) {
|
if ((spl.isOpen()&&(spl.isSlideable()))) {
|
||||||
menuArchive.setVisible(false);
|
menuArchive.setVisible(false);
|
||||||
menuMucDetails.setVisible(false);
|
menuMucDetails.setVisible(false);
|
||||||
menuContactDetails.setVisible(false);
|
menuContactDetails.setVisible(false);
|
||||||
menuSecure.setVisible(false);
|
menuSecure.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
((MenuItem) menu.findItem(R.id.action_add)).setVisible(false);
|
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
|
||||||
if (this.getSelectedConversation()!=null) {
|
if (this.getSelectedConversation()!=null) {
|
||||||
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
|
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
|
||||||
menuMucDetails.setVisible(true);
|
menuMucDetails.setVisible(true);
|
||||||
|
|
|
@ -337,16 +337,19 @@ public class ConversationFragment extends Fragment {
|
||||||
this.selfBitmap = findSelfPicture();
|
this.selfBitmap = findSelfPicture();
|
||||||
updateMessages();
|
updateMessages();
|
||||||
// rendering complete. now go tell activity to close pane
|
// rendering complete. now go tell activity to close pane
|
||||||
|
if (activity.getSlidingPaneLayout().isSlideable()) {
|
||||||
if (!activity.shouldPaneBeOpen()) {
|
if (!activity.shouldPaneBeOpen()) {
|
||||||
activity.getSlidingPaneLayout().closePane();
|
activity.getSlidingPaneLayout().closePane();
|
||||||
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
|
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
activity.getActionBar().setTitle(conversation.getName());
|
activity.getActionBar().setTitle(conversation.getName());
|
||||||
activity.invalidateOptionsMenu();
|
activity.invalidateOptionsMenu();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!conversation.isRead()) {
|
if (!conversation.isRead()) {
|
||||||
conversation.markRead();
|
conversation.markRead();
|
||||||
activity.updateConversationList();
|
activity.updateConversationList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (queuedPqpMessage != null) {
|
if (queuedPqpMessage != null) {
|
||||||
this.conversation.nextMessageEncryption = Message.ENCRYPTION_PGP;
|
this.conversation.nextMessageEncryption = Message.ENCRYPTION_PGP;
|
||||||
Message message = new Message(conversation, queuedPqpMessage,
|
Message message = new Message(conversation, queuedPqpMessage,
|
||||||
|
|
Loading…
Reference in New Issue