Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 213 additions & 29 deletions app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,16 @@ class FileDisplayActivity :
}
}
}

if (isDrawerLayout) {
mMenuButton.visibility = View.VISIBLE
} else {
if (isRoot(currentDir)) {
mMenuButton.visibility = View.GONE
} else {
mMenuButton.visibility = View.VISIBLE
}
}
}

override fun onPostCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -1059,6 +1069,9 @@ class FileDisplayActivity :
private fun exitSelectionMode() {
val ocFileListFragment = this.listOfFilesFragment
ocFileListFragment?.exitSelectionMode()

// Update toolbar with current directory
updateActionBarTitleAndHomeButton(currentDir)
}

private fun requestUploadOfFilesFromFileSystem(data: Intent, resultCode: Int) {
Expand Down Expand Up @@ -1981,6 +1994,16 @@ class FileDisplayActivity :
chosenFile = file // if no file is passed, current file decides
}
super.updateActionBarTitleAndHomeButton(chosenFile)

if (isDrawerLayout) {
mMenuButton.visibility = View.VISIBLE
} else {
if (isRoot(currentDir)) {
mMenuButton.visibility = View.GONE
} else {
mMenuButton.visibility = View.VISIBLE
}
}
}

override fun isDrawerIndicatorAvailable(): Boolean = isRoot(getCurrentDir())
Expand Down
68 changes: 47 additions & 21 deletions app/src/main/res/layout/activity_compose.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,61 @@
-->
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:focusable="true">

<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/sidebar_menu"
android:layout_width="@dimen/drawer_width"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
layout="@layout/sidebar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" />

<include layout="@layout/toolbar_standard" />
</FrameLayout>

<androidx.compose.ui.platform.ComposeView
android:id="@+id/compose_view"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior" />

</LinearLayout>
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/sidebar_menu"
app:layout_constraintTop_toTopOf="parent">

<include layout="@layout/toolbar_standard" />

<androidx.compose.ui.platform.ComposeView
android:id="@+id/compose_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

<include
layout="@layout/drawer"
Expand Down
47 changes: 37 additions & 10 deletions app/src/main/res/layout/activity_navigator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,48 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.coordinatorlayout.widget.CoordinatorLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<include
android:id="@+id/appbar"
layout="@layout/toolbar_standard" />
<FrameLayout
android:id="@+id/sidebar_menu"
android:layout_width="@dimen/drawer_width"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include
layout="@layout/sidebar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/sidebar_menu"
app:layout_constraintTop_toTopOf="parent">

<include
android:id="@+id/appbar"
layout="@layout/toolbar_standard" />

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

<include
layout="@layout/drawer"
Expand Down
52 changes: 40 additions & 12 deletions app/src/main/res/layout/contacts_preference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,55 @@
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- The main content view -->
<RelativeLayout
android:id="@+id/contacts_layout"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<include layout="@layout/toolbar_standard" />
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/appbar">
android:id="@+id/sidebar_menu"
android:layout_width="@dimen/drawer_width"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
layout="@layout/sidebar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" />

</FrameLayout>
</RelativeLayout>

<!-- The main content view -->
<RelativeLayout
android:id="@+id/contacts_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/sidebar_menu"
app:layout_constraintTop_toTopOf="parent">

<include layout="@layout/toolbar_standard" />

<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/appbar">

</FrameLayout>
</RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

<include
layout="@layout/drawer"
Expand Down
108 changes: 67 additions & 41 deletions app/src/main/res/layout/files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,83 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.coordinatorlayout.widget.CoordinatorLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<include
android:id="@+id/appbar"
layout="@layout/toolbar_standard" />
<FrameLayout
android:id="@+id/sidebar_menu"
android:layout_width="@dimen/drawer_width"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
layout="@layout/sidebar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" />

</FrameLayout>

<!-- The main content view -->
<LinearLayout
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_default"
android:baselineAligned="false"
android:contentDescription="@string/list_layout"
android:orientation="horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/sidebar_menu"
app:layout_constraintTop_toTopOf="parent">

<FrameLayout
android:id="@+id/left_fragment_container"
android:layout_width="0dp"
<include
android:id="@+id/appbar"
layout="@layout/toolbar_standard" />

<!-- The main content view -->
<LinearLayout
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:background="@color/bg_default"
android:baselineAligned="false"
android:contentDescription="@string/list_layout"
android:orientation="horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

</LinearLayout>
<FrameLayout
android:id="@+id/left_fragment_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
app:labelVisibilityMode="labeled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:menu="@menu/bottom_navigation_menu"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior" />
</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginBottom="@dimen/floating_action_button_bottom_margin"
android:contentDescription="@string/fab_label"
app:srcCompat="@drawable/ic_plus"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior"
android:visibility="gone"
tools:visibility="visible" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
app:labelVisibilityMode="labeled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:menu="@menu/bottom_navigation_menu"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginBottom="@dimen/floating_action_button_bottom_margin"
android:contentDescription="@string/fab_label"
app:srcCompat="@drawable/ic_plus"
app:layout_behavior="com.nextcloud.ui.behavior.OnScrollBehavior"
android:visibility="gone"
tools:visibility="visible" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

<include
layout="@layout/drawer"
Expand Down
Loading
Loading