From 0cbbd0bd2e3fda57fb88285aa8142e5bc25907dd Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 19 Sep 2015 12:27:57 +0100 Subject: Update OpenVPN files, fix export of config (closes #396) --- main/openvpn | 2 +- .../de/blinkt/openvpn/fragments/ShowConfigFragment.java | 16 +++++++++------- main/src/main/res/layout/log_fragment.xml | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/main/openvpn b/main/openvpn index 601da8f5..701e103d 160000 --- a/main/openvpn +++ b/main/openvpn @@ -1 +1 @@ -Subproject commit 601da8f5c2cb21d46c5e35694651294794c1a6c0 +Subproject commit 701e103d16c09c73ed5ccc28687d9faf7212dafe diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java index 271453b6..50df86c1 100644 --- a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java +++ b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java @@ -25,22 +25,23 @@ import de.blinkt.openvpn.core.ProfileManager; public class ShowConfigFragment extends Fragment { private String configtext; private TextView mConfigView; + private ImageButton mfabButton; - public android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v=inflater.inflate(R.layout.viewconfig, container,false); mConfigView = (TextView) v.findViewById(R.id.configview); - ImageButton fabButton = (ImageButton) v.findViewById(R.id.share_config); - if (fabButton!=null) - fabButton.setOnClickListener( new View.OnClickListener() { + mfabButton = (ImageButton) v.findViewById(R.id.share_config); + if (mfabButton!=null) + mfabButton.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { shareConfig(); } }); - + mfabButton.setVisibility(View.INVISIBLE); return v; } @@ -50,12 +51,13 @@ public class ShowConfigFragment extends Fragment { new Thread() { public void run() { /* Add a few newlines to make the textview scrollable past the FAB */ - final String cfg=vp.getConfigFile(getActivity(),false) + "\n\n\n"; + configtext = vp.getConfigFile(getActivity(),false) + "\n\n\n"; getActivity().runOnUiThread(new Runnable() { @Override public void run() { - cv.setText(cfg); + cv.setText(configtext); + mfabButton.setVisibility(View.VISIBLE); } }); diff --git a/main/src/main/res/layout/log_fragment.xml b/main/src/main/res/layout/log_fragment.xml index 491882a9..ac70c01f 100644 --- a/main/src/main/res/layout/log_fragment.xml +++ b/main/src/main/res/layout/log_fragment.xml @@ -30,6 +30,7 @@ -- cgit v1.2.3