-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added parent interface to encapsulate actions on the DataUsageView's …
…parent
- Loading branch information
1 parent
5147bdb
commit 85b4c28
Showing
7 changed files
with
65 additions
and
19 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
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
13 changes: 13 additions & 0 deletions
13
app/src/main/kotlin/io/github/francoiscampbell/xposeddatausage/widget/DataUsageViewParent.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,13 @@ | ||
package io.github.francoiscampbell.xposeddatausage.widget | ||
|
||
import android.view.ViewGroup | ||
import android.widget.TextView | ||
|
||
/** | ||
* Created by francois on 16-04-10. | ||
*/ | ||
interface DataUsageViewParent { | ||
val clock: TextView | ||
val notificationArea: ViewGroup | ||
val systemIconArea: ViewGroup | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/kotlin/io/github/francoiscampbell/xposeddatausage/widget/HookedStatusBar.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,21 @@ | ||
package io.github.francoiscampbell.xposeddatausage.widget | ||
|
||
import android.view.ViewGroup | ||
import android.widget.TextView | ||
import de.robv.android.xposed.callbacks.XC_LayoutInflated | ||
import io.github.francoiscampbell.xposeddatausage.util.findViewById | ||
import javax.inject.Inject | ||
|
||
/** | ||
* Created by francois on 16-04-10. | ||
*/ | ||
class HookedStatusBar @Inject constructor(val liparam: XC_LayoutInflated.LayoutInflatedParam) : DataUsageViewParent { | ||
override val clock: TextView | ||
get() = liparam.findViewById("clock") as TextView | ||
|
||
override val notificationArea: ViewGroup | ||
get() = liparam.findViewById("notification_icon_area_inner") as ViewGroup | ||
|
||
override val systemIconArea: ViewGroup | ||
get() = liparam.findViewById("system_icon_area") as ViewGroup | ||
} |
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