Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/adb/improve-proxy-ui'
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Oct 6, 2024
2 parents aa45a90 + b0ae2da commit 7a66085
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ public View getView(final int position, View v, final ViewGroup parent) {
}
if (proxyUrl.equals(selectedProxy)) {
checkmark.setVisibility(View.VISIBLE);
status.setVisibility(View.VISIBLE);
status.setText(getConnectivityString());
if(dcContext.isConfigured() == 1 && dcContext.getConfigInt(CONFIG_PROXY_ENABLED) == 1) {
status.setVisibility(View.VISIBLE);
status.setText(getConnectivityString());
} else {
status.setVisibility(View.GONE);
}
} else {
checkmark.setVisibility(View.GONE);
status.setVisibility(View.GONE);
Expand Down
20 changes: 10 additions & 10 deletions src/main/res/layout/proxy_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:background="?attr/conversation_list_item_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingEnd="6dp"
>

<TextView
Expand All @@ -19,6 +16,8 @@
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/share"
android:paddingStart="16dp"
android:paddingTop="10dp"
android:drawablePadding="5dp"
android:singleLine="true"
android:ellipsize="marquee"
Expand All @@ -34,6 +33,8 @@
android:layout_below="@+id/host"
android:layout_toStartOf="@id/share"
android:layout_marginTop="5dp"
android:paddingStart="16dp"
android:paddingBottom="10dp"
android:gravity="center_vertical"
>

Expand Down Expand Up @@ -80,11 +81,10 @@

<ImageButton
android:id="@+id/share"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="50dp"
android:layout_height="60dp"
android:layout_toStartOf="@id/delete"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp"
android:contentDescription="@string/menu_share"
android:background="@drawable/touch_highlight_background"
android:src="@drawable/ic_share_white_24dp"
Expand All @@ -93,8 +93,8 @@

<ImageButton
android:id="@+id/delete"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="50dp"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:contentDescription="@string/delete"
Expand Down

0 comments on commit 7a66085

Please sign in to comment.