Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
e50094af
Commit
e50094af
authored
Oct 22, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added install fragment
parent
93edf729
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
0 deletions
+48
-0
RedesignModule.kt
app/src/main/java/com/topjohnwu/magisk/di/RedesignModule.kt
+2
-0
Navigation.kt
.../java/com/topjohnwu/magisk/model/navigation/Navigation.kt
+5
-0
InstallFragment.kt
...n/java/com/topjohnwu/magisk/ui/install/InstallFragment.kt
+13
-0
InstallViewModel.kt
.../java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
+5
-0
fragment_install_md2.xml
app/src/main/res/layout/fragment_install_md2.xml
+23
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/di/RedesignModule.kt
View file @
e50094af
...
...
@@ -11,6 +11,7 @@ import com.topjohnwu.magisk.redesign.safetynet.SafetynetViewModel
import
com.topjohnwu.magisk.redesign.settings.SettingsViewModel
import
com.topjohnwu.magisk.redesign.superuser.SuperuserViewModel
import
com.topjohnwu.magisk.redesign.theme.ThemeViewModel
import
com.topjohnwu.magisk.ui.install.InstallViewModel
import
org.koin.androidx.viewmodel.dsl.viewModel
import
org.koin.dsl.module
...
...
@@ -25,6 +26,7 @@ val redesignModule = module {
viewModel
{
SettingsViewModel
()
}
viewModel
{
SuperuserViewModel
(
get
(),
get
(),
get
(),
get
())
}
viewModel
{
ThemeViewModel
()
}
viewModel
{
InstallViewModel
()
}
viewModel
{
MainViewModel
()
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/model/navigation/Navigation.kt
View file @
e50094af
...
...
@@ -10,6 +10,7 @@ import com.topjohnwu.magisk.redesign.safetynet.SafetynetFragment
import
com.topjohnwu.magisk.ui.MainActivity
import
com.topjohnwu.magisk.ui.hide.MagiskHideFragment
import
com.topjohnwu.magisk.ui.home.HomeFragment
import
com.topjohnwu.magisk.ui.install.InstallFragment
import
com.topjohnwu.magisk.ui.log.LogFragment
import
com.topjohnwu.magisk.ui.module.ModulesFragment
import
com.topjohnwu.magisk.ui.module.ReposFragment
...
...
@@ -93,6 +94,10 @@ object Navigation {
}
}
fun
install
()
=
MagiskNavigationEvent
{
navDirections
{
destination
=
InstallFragment
::
class
}
}
fun
fromSection
(
section
:
String
)
=
when
(
section
)
{
"superuser"
->
superuser
()
"modules"
->
modules
()
...
...
app/src/main/java/com/topjohnwu/magisk/ui/install/InstallFragment.kt
0 → 100644
View file @
e50094af
package
com.topjohnwu.magisk.ui.install
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentInstallMd2Binding
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
import
org.koin.androidx.viewmodel.ext.android.viewModel
class
InstallFragment
:
CompatFragment
<
InstallViewModel
,
FragmentInstallMd2Binding
>()
{
override
val
layoutRes
=
R
.
layout
.
fragment_install_md2
override
val
viewModel
by
viewModel
<
InstallViewModel
>()
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
0 → 100644
View file @
e50094af
package
com.topjohnwu.magisk.ui.install
import
com.topjohnwu.magisk.redesign.compat.CompatViewModel
class
InstallViewModel
:
CompatViewModel
()
\ No newline at end of file
app/src/main/res/layout/fragment_install_md2.xml
0 → 100644
View file @
e50094af
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"viewModel"
type=
"com.topjohnwu.magisk.ui.install.InstallViewModel"
/>
</data>
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fillViewport=
"true"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</androidx.core.widget.NestedScrollView>
</layout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment