mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
For #1843 - Adds a create collections fragment and navigates to it
This commit is contained in:
parent
36cd275eed
commit
63574cc359
@ -0,0 +1,23 @@
|
||||
package org.mozilla.fenix.collections
|
||||
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
||||
import org.mozilla.fenix.R
|
||||
|
||||
class CreateCollectionFragment : Fragment() {
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_create_collection, container, false)
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -176,7 +176,10 @@ class HomeFragment : Fragment(), CoroutineScope {
|
||||
@SuppressWarnings("ComplexMethod")
|
||||
private fun handleTabAction(action: TabAction) {
|
||||
Do exhaustive when (action) {
|
||||
is TabAction.SaveTabGroup -> {}
|
||||
is TabAction.SaveTabGroup -> {
|
||||
val direction = HomeFragmentDirections.actionHomeFragmentToCreateCollectionFragment()
|
||||
Navigation.findNavController(view!!).navigate(direction)
|
||||
}
|
||||
is TabAction.MenuTapped -> {
|
||||
val isPrivate = (activity as HomeActivity).browsingModeManager.isPrivate
|
||||
val titles = requireComponents.core.sessionManager.sessions
|
||||
|
11
app/src/main/res/layout/fragment_create_collection.xml
Normal file
11
app/src/main/res/layout/fragment_create_collection.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.mozilla.fenix.collections.CreateCollectionFragment">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
@ -32,6 +32,9 @@
|
||||
<action
|
||||
android:id="@+id/action_homeFragment_to_settingsFragment"
|
||||
app:destination="@id/settingsFragment" />
|
||||
<action
|
||||
android:id="@+id/action_homeFragment_to_createCollectionFragment"
|
||||
app:destination="@id/createCollectionFragment" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
@ -284,4 +287,9 @@
|
||||
android:id="@+id/trackingProtectionFragment"
|
||||
android:name="org.mozilla.fenix.settings.TrackingProtectionFragment"
|
||||
android:label="TrackingProtectionFragment" />
|
||||
<fragment
|
||||
android:id="@+id/createCollectionFragment"
|
||||
android:name="org.mozilla.fenix.collections.CreateCollectionFragment"
|
||||
android:label="fragment_create_collection"
|
||||
tools:layout="@layout/fragment_create_collection" />
|
||||
</navigation>
|
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<resources>
|
||||
|
Loading…
Reference in New Issue
Block a user