diff --git a/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/settings/device/DeviceListAdapter.java b/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/settings/device/DeviceListAdapter.java index 55aa532..94f6aa5 100644 --- a/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/settings/device/DeviceListAdapter.java +++ b/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/settings/device/DeviceListAdapter.java @@ -6,6 +6,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; +import dev.nuculabs.nucuhub.R; import dev.nuculabs.nucuhub.domain.Device; import java.util.ArrayList; @@ -44,14 +45,15 @@ public class DeviceListAdapter extends BaseAdapter { @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; - final TextView text; if (view == null) { - view = inflater.inflate(android.R.layout.simple_list_item_1, null); + view = inflater.inflate(R.layout.settings_device_list_item, null); } - - text = (TextView) view; + final TextView text = view.findViewById(R.id.settingsDeviceListDeviceListItemText); text.setText(items.get(position).toString()); + // TODO: Add click listeners for Delete And Select Buttons. + // TODO: Mark selected item row? + return view; } diff --git a/NucuHub.Android/app/src/main/res/drawable/ic_baseline_delete_24.xml b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_delete_24.xml new file mode 100644 index 0000000..de738a6 --- /dev/null +++ b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_delete_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_24.xml b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_24.xml new file mode 100644 index 0000000..3383294 --- /dev/null +++ b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_border_24.xml b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_border_24.xml new file mode 100644 index 0000000..b6d93ca --- /dev/null +++ b/NucuHub.Android/app/src/main/res/drawable/ic_baseline_star_border_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/NucuHub.Android/app/src/main/res/layout/settings_device_list_item.xml b/NucuHub.Android/app/src/main/res/layout/settings_device_list_item.xml new file mode 100644 index 0000000..a1720d3 --- /dev/null +++ b/NucuHub.Android/app/src/main/res/layout/settings_device_list_item.xml @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/NucuHub.Android/app/src/main/res/values/strings.xml b/NucuHub.Android/app/src/main/res/values/strings.xml index 27ace7e..d9b42ec 100644 --- a/NucuHub.Android/app/src/main/res/values/strings.xml +++ b/NucuHub.Android/app/src/main/res/values/strings.xml @@ -49,4 +49,6 @@ Download incoming attachments Automatically download attachments for incoming emails Only download attachments when manually requested + Delete Icon + Select Icon \ No newline at end of file