diff options
Diffstat (limited to 'src/eu/siacs/conversations/ui')
4 files changed, 18 insertions, 13 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 04af0e84..1f2747f7 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -88,7 +88,7 @@ public class ConversationActivity extends XmppActivity implements } public void setSelectedConversation(Conversation conversation) { - this.selectedConversation = conversation; + this.selectedConversation = conversation; } public ListView getConversationListView() { @@ -98,21 +98,21 @@ public class ConversationActivity extends XmppActivity implements public boolean shouldPaneBeOpen() { return paneShouldBeOpen; } - + public void showConversationsOverview() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; mSlidingPaneLayout.openPane(); } } - + public void hideConversationsOverview() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; mSlidingPaneLayout.closePane(); } } - + public boolean isConversationsOverviewHideable() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; @@ -121,7 +121,7 @@ public class ConversationActivity extends XmppActivity implements return false; } } - + public boolean isConversationsOverviewVisable() { if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; @@ -166,13 +166,14 @@ public class ConversationActivity extends XmppActivity implements } }); mContentView = findViewById(R.id.content_view_spl); - if (mContentView==null) { + if (mContentView == null) { mContentView = findViewById(R.id.content_view_ll); } if (mContentView instanceof SlidingPaneLayout) { SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView; mSlidingPaneLayout.setParallaxDistance(150); - mSlidingPaneLayout.setShadowResource(R.drawable.es_slidingpane_shadow); + mSlidingPaneLayout + .setShadowResource(R.drawable.es_slidingpane_shadow); mSlidingPaneLayout.setSliderFadeColor(0); mSlidingPaneLayout.setPanelSlideListener(new PanelSlideListener() { @@ -253,7 +254,8 @@ public class ConversationActivity extends XmppActivity implements .findItem(R.id.action_invite); MenuItem menuMute = (MenuItem) menu.findItem(R.id.action_mute); - if (isConversationsOverviewVisable() && isConversationsOverviewHideable()) { + if (isConversationsOverviewVisable() + && isConversationsOverviewHideable()) { menuArchive.setVisible(false); menuMucDetails.setVisible(false); menuContactDetails.setVisible(false); @@ -669,7 +671,8 @@ public class ConversationActivity extends XmppActivity implements public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putString(STATE_OPEN_CONVERSATION, getSelectedConversation().getUuid()); - savedInstanceState.putBoolean(STATE_PANEL_OPEN, isConversationsOverviewVisable()); + savedInstanceState.putBoolean(STATE_PANEL_OPEN, + isConversationsOverviewVisable()); super.onSaveInstanceState(savedInstanceState); } diff --git a/src/eu/siacs/conversations/ui/StartConversationActivity.java b/src/eu/siacs/conversations/ui/StartConversationActivity.java index 78218360..a1a2d4c2 100644 --- a/src/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/eu/siacs/conversations/ui/StartConversationActivity.java @@ -403,7 +403,7 @@ public class StartConversationActivity extends XmppActivity { String conferenceJid = jid.getText().toString(); Account account = xmppConnectionService .findAccountByJid(accountJid); - if (account==null) { + if (account == null) { dialog.dismiss(); return; } diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 39ca623b..cd77557c 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -208,7 +208,8 @@ public abstract class XmppActivity extends Activity { mColorOrange = getResources().getColor(R.color.orange); mColorGreen = getResources().getColor(R.color.green); mPrimaryColor = getResources().getColor(R.color.primary); - mSecondaryBackgroundColor = getResources().getColor(R.color.secondarybackground); + mSecondaryBackgroundColor = getResources().getColor( + R.color.secondarybackground); if (getPreferences().getBoolean("use_larger_font", false)) { setTheme(R.style.ConversationsTheme_LargerText); } @@ -520,7 +521,7 @@ public abstract class XmppActivity extends Activity { public int getPrimaryColor() { return this.mPrimaryColor; } - + public int getSecondaryBackgroundColor() { return this.mSecondaryBackgroundColor; } diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 583772ba..f74856b0 100644 --- a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -42,7 +42,8 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { ConversationActivity activity = (ConversationActivity) this.activity; if (!activity.isConversationsOverviewHideable()) { if (conv == activity.getSelectedConversation()) { - view.setBackgroundColor(activity.getSecondaryBackgroundColor()); + view.setBackgroundColor(activity + .getSecondaryBackgroundColor()); } else { view.setBackgroundColor(Color.TRANSPARENT); } |