Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45263932 authored by Danny Baumann's avatar Danny Baumann Committed by Steve Kondik
Browse files

Improve app op details layout.

Change-Id: I38a2c3679633ae85aec61703ab933410775bb336
parent db1637f5
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -16,19 +16,14 @@
** limitations under the License.
*/
-->
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:scrollbarStyle="@*android:integer/preference_fragment_scrollbarStyle">

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/all_details"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="5dip"
        android:orientation="vertical">
    android:orientation="vertical"
    android:scrollbarStyle="@*android:integer/preference_fragment_scrollbarStyle">

    <!-- App snippet -->
    <LinearLayout
@@ -46,6 +41,11 @@

    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipToPadding="false">

        <!-- Operations list -->
        <LinearLayout
            android:id="@+id/operations_section"
@@ -53,5 +53,5 @@
            android:layout_height="match_parent"
            android:orientation="vertical">
        </LinearLayout>
    </LinearLayout>
    </ScrollView>
</LinearLayout>
+26 −27
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
*/
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
@@ -30,21 +30,18 @@
        android:id="@+id/op_icon"
        android:layout_width="@android:dimen/app_icon_size"
        android:layout_height="@android:dimen/app_icon_size"
        android:layout_alignParentStart="true"
        android:layout_centerVertical="true"
        android:layout_marginEnd="8dip"
        android:scaleType="centerInside"
        android:contentDescription="@null" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical">

    <TextView
        android:id="@+id/op_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
            android:layout_gravity="fill_horizontal"
        android:layout_toEndOf="@id/op_icon"
        android:layout_toStartOf="@+id/switchWidget"
        android:layout_marginTop="2dip"
        android:singleLine="true"
        android:ellipsize="marquee"
@@ -55,18 +52,20 @@
        android:id="@+id/op_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
            android:layout_gravity="fill_horizontal|top"
        android:layout_toEndOf="@id/op_icon"
        android:layout_toStartOf="@+id/switchWidget"
        android:layout_below="@id/op_name"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textAlignment="viewStart" />

    </LinearLayout>

    <Switch android:id="@+id/switchWidget"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"
        android:layout_marginStart="8dip"
        android:padding="8dip"
        android:focusable="false"
        android:clickable="true" />

</LinearLayout>
</RelativeLayout>
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public class AppOpsDetails extends Fragment {
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        final View view = inflater.inflate(R.layout.app_ops_details, container, false);
        Utils.prepareCustomPreferencesList(container, view, view, false);
        Utils.prepareCustomPreferencesList(container, view, view, true);

        mRootView = view;
        mOperationsSection = (LinearLayout)view.findViewById(R.id.operations_section);