From 1aaad0f6dc768dae4b48beaa8466622519480037 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 6 Dec 2013 15:03:04 +0100 Subject: Fix bug, when fragment is attached after being created. --- src/de/blinkt/openvpn/fragments/LogFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/de/blinkt/openvpn') 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,15 +602,19 @@ 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); return v; } + @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); -- cgit v1.2.3