summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-09-19 12:27:57 +0100
committerArne Schwabe <arne@rfc2549.org>2015-09-19 12:27:57 +0100
commit0cbbd0bd2e3fda57fb88285aa8142e5bc25907dd (patch)
tree79f1995b31a0a1bd60c98a1680632e337f1ef322 /main/src
parenta9e9985cc0109bd2e93544eaa32ae9c332d31d6d (diff)
Update OpenVPN files, fix export of config (closes #396)
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java16
-rw-r--r--main/src/main/res/layout/log_fragment.xml1
2 files changed, 10 insertions, 7 deletions
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 @@
<ListView
android:id="@android:id/list"
+ android:stackFromBottom="true"
android:transcriptMode="normal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>