-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #599 from Mahmud0808/op-media
Oneplus style quick settings
- Loading branch information
Showing
22 changed files
with
2,697 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/OpQsHeader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.drdisagree.iconify.ui.fragments.xposed | ||
|
||
import com.drdisagree.iconify.R | ||
import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_EXPANSION_Y | ||
import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_SWITCH | ||
import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_TOP_MARGIN | ||
import com.drdisagree.iconify.ui.activities.MainActivity | ||
import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat | ||
|
||
class OpQsHeader : ControlledPreferenceFragmentCompat() { | ||
|
||
override val title: String | ||
get() = getString(R.string.activity_title_op_qs_header) | ||
|
||
override val backButtonEnabled: Boolean | ||
get() = true | ||
|
||
override val layoutResource: Int | ||
get() = R.xml.xposed_op_qs_header | ||
|
||
override val hasMenu: Boolean | ||
get() = true | ||
|
||
override fun updateScreen(key: String?) { | ||
super.updateScreen(key) | ||
|
||
when (key) { | ||
OP_QS_HEADER_SWITCH, | ||
OP_QS_HEADER_TOP_MARGIN, | ||
OP_QS_HEADER_EXPANSION_Y -> { | ||
MainActivity.showOrHidePendingActionButton( | ||
activityBinding = (requireActivity() as MainActivity).binding, | ||
requiresSystemUiRestart = true | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.