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

Commit 29cb6795 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge branch '2442-master-tablet_fixes' into 'master'

Fix ui for tablets

See merge request !30
parents 2fb14b7b 066c5f6b
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ public class EmptyTaskFragment extends SupportFragment
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        View view = inflater.inflate(R.layout.opentasks_fragment_empty_task, container, false);
        view.findViewById(R.id.empty_task_fragment_appbar).setBackgroundColor(mColor.argb());
        return view;
    }
}
+34 −31
Original line number Diff line number Diff line
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools">

    <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/primary_dark"
            >
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

        <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="432dp"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/primary_dark"
                android:layout_width="@dimen/opentasks_two_pane_list_width"
                android:layout_height="?attr/actionBarSize"
                app:popupTheme="@style/actionBarPopUpTheme"/>

        <com.google.android.material.tabs.TabLayout
                android:id="@+id/tabs"
                android:layout_width="432dp"
                android:layout_width="@dimen/opentasks_two_pane_list_width"
                android:layout_height="wrap_content"
                android:background="?android:windowBackground"
                app:tabGravity="fill"
                app:tabIconTint="@color/accent"
                app:tabIndicatorColor="@color/accent"
                app:tabIndicatorHeight="8dp"
                app:tabBackground="@color/primary_dark"
                app:tabMode="fixed"/>
    </com.google.android.material.appbar.AppBarLayout>

    <FrameLayout
            android:id="@+id/task_detail_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            android:layout_marginStart="432dp"
            android:backgroundTint="@color/color_default_background"
            android:background="@drawable/opentasks_popup_background_mtrl_mult"
            android:layout_marginLeft="432dp"
            android:layout_marginTop="40dp"
            android:layout_marginEnd="96dp"
            android:layout_marginRight="96dp"
            android:layout_marginBottom="-8dp"
            android:elevation="8dp" />

    <androidx.viewpager.widget.ViewPager xmlns:tools="http://schemas.android.com/tools"
    <androidx.viewpager.widget.ViewPager
            android:id="@+id/pager"
            android:layout_width="432dp"
            android:layout_height="match_parent"
            android:layout_width="@dimen/opentasks_two_pane_list_width"
            android:layout_height="0dp"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            tools:context=".MainActivity" />
            tools:context=".MainActivity"
            app:layout_constraintTop_toBottomOf="@id/appbar"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/floating_action_button"
@@ -59,9 +50,21 @@
            android:layout_gravity="center"
            android:layout_margin="16dp"
            android:src="@drawable/ic_action_add"
            app:layout_anchor="@id/appbar"
            app:backgroundTint="@color/e_accent"
            app:tint="@color/e_background"
            android:tint="@color/e_background"
            app:layout_anchorGravity="bottom|right|end" />
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="@id/pager"/>

    <FrameLayout
            android:id="@+id/task_detail_container"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginLeft="@dimen/opentasks_two_pane_list_width"
            android:layout_marginStart="@dimen/opentasks_two_pane_list_width"
            android:backgroundTint="@color/color_default_background"
            android:background="@drawable/opentasks_popup_background_mtrl_mult"
            app:layout_constraintTop_toBottomOf="@id/appbar"
            app:layout_constraintBottom_toBottomOf="parent"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
 No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+60 −43
Original line number Diff line number Diff line
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools">

        <com.google.android.material.appbar.AppBarLayout
                android:id="@+id/appbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/primary_dark"
            app:elevation="0dp">
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

            <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
@@ -26,28 +28,43 @@
                    app:tabIconTint="@color/accent"
                    app:tabIndicatorColor="@color/accent"
                    app:tabIndicatorHeight="8dp"
                    app:tabBackground="@color/primary_dark"
                    app:tabMode="fixed"/>
        </com.google.android.material.appbar.AppBarLayout>

        <androidx.viewpager.widget.ViewPager
                android:id="@+id/pager"
                android:layout_width="@dimen/opentasks_two_pane_list_width"
                android:layout_height="0dp"
                app:layout_behavior="@string/appbar_scrolling_view_behavior"
                tools:context=".MainActivity"
                app:layout_constraintTop_toBottomOf="@id/appbar"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/floating_action_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_margin="16dp"
                android:src="@drawable/ic_action_add"
                app:tint="@color/e_background"
                app:backgroundTint="@color/e_accent"
                android:tint="@color/e_background"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="@id/pager"/>

        <FrameLayout
                android:id="@+id/task_detail_container"
                android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            android:layout_marginTop="40dp"
                android:layout_height="0dp"
                android:layout_marginLeft="@dimen/opentasks_two_pane_list_width"
                android:layout_marginStart="@dimen/opentasks_two_pane_list_width"
            android:layout_marginBottom="-8dp"
                android:backgroundTint="@color/color_default_background"
            android:background="@drawable/opentasks_popup_background_mtrl_mult"/>


    <androidx.viewpager.widget.ViewPager xmlns:tools="http://schemas.android.com/tools"
            android:id="@+id/pager"
            android:layout_width="@dimen/opentasks_two_pane_list_width"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            tools:context=".MainActivity"/>
                android:background="@drawable/opentasks_popup_background_mtrl_mult"
                app:layout_constraintTop_toBottomOf="@id/appbar"
                app:layout_constraintBottom_toBottomOf="parent"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
 No newline at end of file
    </androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+0 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <bool name="has_two_panes">true</bool>

</resources>
 No newline at end of file
+0 −6
Original line number Diff line number Diff line
<resources>

    <dimen name="task_list_right_margin">10dp</dimen>
    <dimen name="opentasks_two_pane_list_width">360dp</dimen>

</resources>
 No newline at end of file
Loading