diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-12-06 15:03:04 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-12-06 15:03:04 +0100 |
commit | 1aaad0f6dc768dae4b48beaa8466622519480037 (patch) | |
tree | c6725beb7bd95bca4af2fbfa3dfddf19c2515168 | |
parent | a222c8d4489c9e0606266e5185f4f3bb5e240fed (diff) |
Fix bug, when fragment is attached after being created.
-rw-r--r-- | src/de/blinkt/openvpn/fragments/LogFragment.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/fragments/LogFragment.java b/src/de/blinkt/openvpn/fragments/LogFragment.java index a2a6e3c4..6d4031a3 100644 --- a/src/de/blinkt/openvpn/fragments/LogFragment.java +++ b/src/de/blinkt/openvpn/fragments/LogFragment.java @@ -602,9 +602,6 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. mLogLevelSlider.setOnSeekBarChangeListener(this); - if(getResources().getBoolean(R.bool.logSildersAlwaysVisible)) - mOptionsLayout.setVisibility(View.VISIBLE); - mUpStatus = (TextView) v.findViewById(R.id.speedUp); mDownStatus = (TextView) v.findViewById(R.id.speedDown); mConnectStatus = (TextView) v.findViewById(R.id.speedStatus); @@ -612,6 +609,13 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. } @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + if(getResources().getBoolean(R.bool.logSildersAlwaysVisible)) + mOptionsLayout.setVisibility(View.VISIBLE); + } + + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); |