Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/UserInterface/PairingFragment.java
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
51 | * The view that the user will see when there are no devices paired, or when you choose "add a new device" from the sidebar. | 51 | * The view that the user will see when there are no devices paired, or when you choose "add a new device" from the sidebar. | ||
52 | */ | 52 | */ | ||
53 | 53 | | |||
54 | public class PairingFragment extends Fragment implements PairingDeviceItem.Callback { | 54 | public class PairingFragment extends Fragment implements PairingDeviceItem.Callback { | ||
55 | 55 | | |||
56 | private static final int RESULT_PAIRING_SUCCESFUL = Activity.RESULT_FIRST_USER; | 56 | private static final int RESULT_PAIRING_SUCCESFUL = Activity.RESULT_FIRST_USER; | ||
57 | 57 | | |||
58 | private View rootView; | 58 | private View rootView; | ||
59 | private View listRootView; | | |||
60 | private SwipeRefreshLayout mSwipeRefreshLayout; | 59 | private SwipeRefreshLayout mSwipeRefreshLayout; | ||
61 | private MaterialActivity mActivity; | 60 | private MaterialActivity mActivity; | ||
62 | 61 | | |||
63 | boolean listRefreshCalledThisFrame = false; | 62 | boolean listRefreshCalledThisFrame = false; | ||
64 | 63 | | |||
65 | TextView headerText; | 64 | TextView headerText; | ||
66 | 65 | | |||
67 | @Override | 66 | @Override | ||
68 | public View onCreateView(LayoutInflater inflater, ViewGroup container, | 67 | public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
69 | Bundle savedInstanceState) { | 68 | Bundle savedInstanceState) { | ||
70 | 69 | | |||
71 | //Log.e("PairingFragmen", "OnCreateView"); | 70 | //Log.e("PairingFragmen", "OnCreateView"); | ||
72 | 71 | | |||
73 | mActivity.getSupportActionBar().setTitle(R.string.pairing_title); | 72 | mActivity.getSupportActionBar().setTitle(R.string.pairing_title); | ||
74 | 73 | | |||
75 | 74 | | |||
76 | setHasOptionsMenu(true); | 75 | setHasOptionsMenu(true); | ||
77 | 76 | | |||
78 | rootView = inflater.inflate(R.layout.activity_refresh_list, container, false); | 77 | rootView = inflater.inflate(R.layout.activity_refresh_list, container, false); | ||
79 | listRootView = rootView.findViewById(R.id.listView1); | 78 | View listRootView = rootView.findViewById(R.id.listView1); | ||
80 | mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout); | 79 | mSwipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.refresh_list_layout); | ||
81 | mSwipeRefreshLayout.setOnRefreshListener( | 80 | mSwipeRefreshLayout.setOnRefreshListener( | ||
82 | new SwipeRefreshLayout.OnRefreshListener() { | 81 | new SwipeRefreshLayout.OnRefreshListener() { | ||
83 | @Override | 82 | @Override | ||
84 | public void onRefresh() { | 83 | public void onRefresh() { | ||
85 | updateComputerListAction(); | 84 | updateComputerListAction(); | ||
86 | } | 85 | } | ||
87 | } | 86 | } | ||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |