I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 17be8fb3 authored by str4d's avatar str4d
Browse files

Load WebFragment properly from AddressbookFragment

parent bf5accb1
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,15 @@ public class AddressbookFragment extends Fragment {
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, View view, int pos, long id) {
CharSequence host = ((TextView) view).getText();
Intent intent = new Intent(view.getContext(), WebFragment.class);
intent.setData(Uri.parse("http://" + host + '/'));
startActivity(intent);
WebFragment f = new WebFragment();
Bundle args = new Bundle();
args.putString(WebFragment.HTML_URI, "http://" + host + '/');
f.setArguments(args);
getActivity().getSupportFragmentManager()
.beginTransaction()
.replace(R.id.main_content, f)
.addToBackStack(null)
.commit();
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment