mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Some layout improvements (#30)
This commit is contained in:
parent
ed6629a9c7
commit
fbd23c2d4c
@ -179,7 +179,9 @@ public class FwAppInstallerActivity extends Activity implements InstallActivity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setInstallEnabled(boolean enable) {
|
public void setInstallEnabled(boolean enable) {
|
||||||
installButton.setEnabled(device != null && device.isConnected() && enable);
|
boolean enabled = device != null && device.isConnected() && enable;
|
||||||
|
installButton.setEnabled(enabled);
|
||||||
|
installButton.setVisibility(enabled ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -7,31 +7,35 @@
|
|||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.FwAppInstallerActivity">
|
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.FwAppInstallerActivity">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/itemListView"
|
android:id="@+id/itemListView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_alignParentEnd="false">
|
||||||
>
|
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/infoTextView"
|
android:id="@+id/infoTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_weight="1"
|
android:layout_alignParentTop="false"
|
||||||
/>
|
android:layout_alignParentEnd="false"
|
||||||
|
android:layout_alignParentStart="false"
|
||||||
|
android:layout_below="@+id/itemListView" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fwappStatusIcon"
|
android:id="@+id/fwappStatusIcon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="Status Icon"
|
android:contentDescription="Status Icon"
|
||||||
android:layout_weight="0"
|
android:layout_centerHorizontal="true"
|
||||||
/>
|
android:layout_alignParentTop="false"
|
||||||
|
android:layout_alignParentLeft="false"
|
||||||
|
android:layout_below="@+id/infoTextView" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/installProgressBar"
|
android:id="@+id/installProgressBar"
|
||||||
@ -39,7 +43,9 @@
|
|||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"
|
||||||
|
android:layout_below="@+id/fwappStatusIcon"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -47,11 +53,19 @@
|
|||||||
android:text="@string/appinstaller_install"
|
android:text="@string/appinstaller_install"
|
||||||
android:id="@+id/installButton"
|
android:id="@+id/installButton"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:enabled="false" />
|
android:enabled="false"
|
||||||
|
android:layout_alignParentBottom="false"
|
||||||
|
android:layout_alignWithParentIfMissing="false"
|
||||||
|
android:layout_alignParentTop="false"
|
||||||
|
android:layout_alignParentLeft="false"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_below="@+id/installProgressBar"
|
||||||
|
android:layout_marginTop="10dp" />
|
||||||
|
|
||||||
<android.widget.Space
|
<android.widget.Space
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="3"/>
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user