parent
45468f6469
commit
8107def798
3 changed files with 16 additions and 0 deletions
|
@ -26,6 +26,7 @@ import android.support.v7.widget.RecyclerView;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -82,6 +83,12 @@ public class BrowseDeviceFragment extends Fragment {
|
|||
if(v == null)
|
||||
v = getView();
|
||||
assert v != null;
|
||||
TextView nodevice = v.findViewById(R.id.no_device);
|
||||
if(devices.size() == 0) {
|
||||
nodevice.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
nodevice.setVisibility(View.GONE);
|
||||
}
|
||||
DeviceAdapter adapter = new DeviceAdapter(devices,listener);
|
||||
RecyclerView view = v.findViewById(R.id.device_list);
|
||||
view.setAdapter(adapter);
|
||||
|
|
|
@ -9,7 +9,15 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
<TextView
|
||||
android:layout_alignParentTop="true"
|
||||
android:id="@+id/no_device"
|
||||
android:text="@string/no_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:layout_below="@+id/no_device"
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
<string name="retry_download">Retry Download Binary</string>
|
||||
<string name="download_binary">Download Binary</string>
|
||||
<string name="informations">Informations</string>
|
||||
<string name="no_device">No Device Pluggued, please plug one to be able to flash a binary on it.</string>
|
||||
<array name="uuencode_array">
|
||||
<item>Yes</item>
|
||||
<item>No</item>
|
||||
|
|
Loading…
Reference in a new issue