diff options
author | Mishiranu <fukurou.mishiranu@gmail.com> | 2016-09-20 02:18:50 +0300 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-09-23 22:11:48 +0200 |
commit | 4fe3b4539a63c99515450af069d51e20722d3992 (patch) | |
tree | b6096731c05ac1ef440d503dcad2ae70ca1ab713 /src/main/java/de/pixart/messenger | |
parent | 4ff29db8b1d4273cf8e44c411a7362be1673bbde (diff) |
Fix "More table" layout
Retain "More table" visibility on screen orientation change
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index ae23336ae..142683c04 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -517,6 +517,9 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate this.mSaveButton.setOnClickListener(this.mSaveButtonClickListener); this.mCancelButton.setOnClickListener(this.mCancelButtonClickListener); this.mMoreTable = (TableLayout) findViewById(R.id.server_info_more); + if (savedInstanceState != null && savedInstanceState.getBoolean("showMoreTable")) { + changeMoreTableVisibility(true); + } final OnCheckedChangeListener OnCheckedShowConfirmPassword = new OnCheckedChangeListener() { @Override public void onCheckedChanged(final CompoundButton buttonView, @@ -582,6 +585,15 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate return super.onCreateOptionsMenu(menu); } + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + final MenuItem showMoreInfo = menu.findItem(R.id.action_server_info_show_more); + if (showMoreInfo.isVisible()) { + showMoreInfo.setChecked(mMoreTable.getVisibility() == View.VISIBLE); + } + return super.onPrepareOptionsMenu(menu); + } + @Override protected void onStart() { super.onStart(); |