Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/UserInterface/DeviceFragment.java
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 60 | public class DeviceFragment extends Fragment { | |||
---|---|---|---|---|---|
68 | 68 | | |||
69 | private MainActivity mActivity; | 69 | private MainActivity mActivity; | ||
70 | 70 | | |||
71 | private ArrayList<ListAdapter.Item> pluginListItems; | 71 | private ArrayList<ListAdapter.Item> pluginListItems; | ||
72 | 72 | | |||
73 | public DeviceFragment() { | 73 | public DeviceFragment() { | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | public DeviceFragment(String deviceId, boolean fromDeviceList) { | 76 | public static DeviceFragment newInstance(String deviceId, boolean fromDeviceList) { | ||
77 | DeviceFragment frag = new DeviceFragment(); | ||||
78 | | ||||
77 | Bundle args = new Bundle(); | 79 | Bundle args = new Bundle(); | ||
78 | args.putString(ARG_DEVICE_ID, deviceId); | 80 | args.putString(ARG_DEVICE_ID, deviceId); | ||
79 | args.putBoolean(ARG_FROM_DEVICE_LIST, fromDeviceList); | 81 | args.putBoolean(ARG_FROM_DEVICE_LIST, fromDeviceList); | ||
80 | this.setArguments(args); | 82 | frag.setArguments(args); | ||
83 | | ||||
84 | return frag; | ||||
81 | } | 85 | } | ||
82 | 86 | | |||
83 | @Override | 87 | @Override | ||
84 | public void onAttach(Activity activity) { | 88 | public void onAttach(Activity activity) { | ||
85 | super.onAttach(activity); | 89 | super.onAttach(activity); | ||
86 | mActivity = ((MainActivity) getActivity()); | 90 | mActivity = ((MainActivity) getActivity()); | ||
87 | } | 91 | } | ||
88 | 92 | | |||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |