From 6f74ca80d395542ae92e7e9eb97af11aa4c706bd Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 27 Apr 2012 23:24:49 +0200 Subject: it is not getIntent() nor savedState nor other fancy stuff, getArgument() is what I want --- src/de/blinkt/openvpn/ShowConfigFragment.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/de/blinkt/openvpn/ShowConfigFragment.java') 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; + }; } -- cgit v1.2.3