diff options
Diffstat (limited to 'src/de/blinkt')
-rw-r--r-- | src/de/blinkt/openvpn/FaqFragment.java | 9 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/FileSelectionFragment.java | 29 |
2 files changed, 30 insertions, 8 deletions
diff --git a/src/de/blinkt/openvpn/FaqFragment.java b/src/de/blinkt/openvpn/FaqFragment.java index 09c6cbdc..c4d1913d 100644 --- a/src/de/blinkt/openvpn/FaqFragment.java +++ b/src/de/blinkt/openvpn/FaqFragment.java @@ -3,6 +3,7 @@ package de.blinkt.openvpn; import android.app.Fragment; import android.os.Bundle; import android.text.Html; +import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; @@ -25,7 +26,15 @@ public class FaqFragment extends Fragment { TextView bImages = (TextView) v.findViewById(R.id.brokenimages); bImages.setText(Html.fromHtml(getActivity().getString(R.string.broken_images_faq))); bImages.setMovementMethod(LinkMovementMethod.getInstance()); + + TextView quickstart = (TextView) v.findViewById(R.id.faq_howto); + Spanned htmltext = Html.fromHtml(getActivity().getString(R.string.faq_howto)); + quickstart.setText(htmltext); + quickstart.setMovementMethod(LinkMovementMethod.getInstance()); + return v; + + } diff --git a/src/de/blinkt/openvpn/FileSelectionFragment.java b/src/de/blinkt/openvpn/FileSelectionFragment.java index c030bba0..1761c395 100644 --- a/src/de/blinkt/openvpn/FileSelectionFragment.java +++ b/src/de/blinkt/openvpn/FileSelectionFragment.java @@ -47,7 +47,8 @@ public class FileSelectionFragment extends ListFragment { private File selectedFile; private HashMap<String, Integer> lastPositions = new HashMap<String, Integer>(); private String mStartPath; - private Button importFile; + private Button mImportFile; + private Button mClearButton; private boolean mHideImport=false; @@ -71,11 +72,22 @@ public class FileSelectionFragment extends ListFragment { } }); + mClearButton = (Button) v.findViewById(R.id.fdClear); + mClearButton.setEnabled(false); + mClearButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + + } + }); + mClearButton.setVisibility(View.GONE); - importFile = (Button) v.findViewById(R.id.importfile); - importFile.setEnabled(false); - importFile.setOnClickListener(new OnClickListener() { - + + mImportFile = (Button) v.findViewById(R.id.importfile); + mImportFile.setEnabled(false); + mImportFile.setOnClickListener(new OnClickListener() { + @Override public void onClick(View v) { ((FileSelect) getActivity()).importFile(selectedFile.getPath()); @@ -83,9 +95,10 @@ public class FileSelectionFragment extends ListFragment { }); if(mHideImport== true) { - importFile.setVisibility(View.GONE); + mImportFile.setVisibility(View.GONE); } + return v; } @@ -224,7 +237,7 @@ public class FileSelectionFragment extends ListFragment { if (file.isDirectory()) { selectButton.setEnabled(false); - importFile.setEnabled(false); + mImportFile.setEnabled(false); if (file.canRead()) { lastPositions.put(currentPath, position); @@ -238,7 +251,7 @@ public class FileSelectionFragment extends ListFragment { selectedFile = file; v.setSelected(true); selectButton.setEnabled(true); - importFile.setEnabled(true); + mImportFile.setEnabled(true); } } |