diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-04-27 23:24:49 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-04-27 23:24:49 +0200 |
commit | 031186e74c9f174d05a09c4059def7bcbc558ac6 (patch) | |
tree | 8506351e5a3e9904c70c881b1d13b2a1d1030383 /src/de/blinkt/openvpn/ShowConfigFragment.java | |
parent | 817812066576fb1e2fd627927ad5cfc7bf7c79d5 (diff) |
it is not getIntent() nor savedState nor other fancy stuff, getArgument() is what I want
Diffstat (limited to 'src/de/blinkt/openvpn/ShowConfigFragment.java')
-rw-r--r-- | src/de/blinkt/openvpn/ShowConfigFragment.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/ShowConfigFragment.java b/src/de/blinkt/openvpn/ShowConfigFragment.java index 91471e84..a69d835a 100644 --- a/src/de/blinkt/openvpn/ShowConfigFragment.java +++ b/src/de/blinkt/openvpn/ShowConfigFragment.java @@ -1,8 +1,22 @@ package de.blinkt.openvpn; import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; public class ShowConfigFragment extends Fragment { - + public android.view.View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) + { + String profileUUID = getArguments().getString(getActivity().getPackageName() + ".profileUUID"); + VpnProfile vp = ProfileManager.get(profileUUID); + String cfg=vp.getConfigFile(getActivity().getCacheDir()); + View v=inflater.inflate(R.layout.viewconfig, container,false); + TextView cv = (TextView) v.findViewById(R.id.configview); + cv.setText(cfg); + return v; + }; } |