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

Commit a8b11f0b authored by LuK1337's avatar LuK1337 Committed by Bruno Martins
Browse files

LineageParts: Improve the way profile triggers UI looks

* Use more modern tab bar
* Remove 'Please select triggers which will activate this profile' text
* Remove background from ViewPager,
* Remove divider from Wi-Fi and Bluetooth ListView.

Change-Id: I20d952b2d7dd4b2fc72f72db25c4f23714aa344c
parent ae7b33ff
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_selected="false"
          android:color="?android:attr/textColorSecondary"/>
    <item android:color="?android:attr/textColorPrimary"/>
</selector>
+8 −19
Original line number Diff line number Diff line
@@ -17,28 +17,17 @@
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
        android:layout_width="wrap_content"
    <org.lineageos.lineageparts.widget.SlidingTabLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/sliding_tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/profile_setup_setup_triggers_description"
        android:padding="8dp"
        android:id="@+id/instructions" />
        android:scrollbars="none"
        android:fillViewport="true" />

    <androidx.viewpager.widget.ViewPager
    <org.lineageos.lineageparts.widget.RtlCompatibleViewPager
        android:id="@+id/view_pager"
        android:layout_weight="1"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?android:attr/colorBackgroundFloating"
        android:gravity="center">
        <androidx.viewpager.widget.PagerTabStrip
                android:id="@+id/tabs"
        android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="top"
                android:textAppearance="@style/TextAppearance.PagerTabs"
                android:paddingStart="@dimen/pager_tabs_padding"
                android:paddingEnd="@dimen/pager_tabs_padding"/>
    </androidx.viewpager.widget.ViewPager>
        android:layout_height="wrap_content" />

</LinearLayout>
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<View
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/sliding_tab_selected_indicator"
    android:layout_width="wrap_content"
    android:layout_height="@dimen/pager_tabs_selected_indicator_height"
    android:background="?android:attr/colorAccent"
    android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent" />
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="0dp"
    android:layout_weight="1"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:ellipsize="end"
    android:fontFamily="sans-serif-medium"
    android:gravity="center"
    android:maxLines="1"
    android:padding="@dimen/pager_tabs_title_padding"
    android:textColor="@color/sliding_tab_title_text_color"
    android:textAllCaps="true"
    android:theme="?android:attr/actionBarTheme"/>
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@
    <dimen name="oval_notification_size">26dp</dimen>

    <dimen name="pager_tabs_padding">0dp</dimen>
    <dimen name="pager_tabs_title_padding">16dp</dimen>
    <dimen name="pager_tabs_selected_indicator_height">3dp</dimen>

    <!-- SwitchBar margin start / end -->
    <dimen name="switchbar_margin_start">72dp</dimen>
Loading