mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Fix: Hide track-controls on pre-KitKat api
This commit is contained in:
parent
f919535173
commit
108b1f4de9
1 changed files with 18 additions and 8 deletions
|
@ -2,6 +2,7 @@ package com.finnmglas.launcher.list.other
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.os.Build
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -74,14 +75,23 @@ class OtherRecyclerAdapter(val activity: Activity):
|
||||||
OtherInfo(activity.getString(R.string.list_other_volume_down),
|
OtherInfo(activity.getString(R.string.list_other_volume_down),
|
||||||
"launcher:volumeDown",
|
"launcher:volumeDown",
|
||||||
activity.getString(R.string.fas_minus)))
|
activity.getString(R.string.fas_minus)))
|
||||||
othersList.add(
|
|
||||||
OtherInfo(activity.getString(R.string.list_other_track_next),
|
if (Build.VERSION.SDK_INT >= 19) { // requires Android KitKat +
|
||||||
"launcher:nextTrack",
|
othersList.add(
|
||||||
activity.getString(R.string.fas_forward)))
|
OtherInfo(
|
||||||
othersList.add(
|
activity.getString(R.string.list_other_track_next),
|
||||||
OtherInfo(activity.getString(R.string.list_other_track_previous),
|
"launcher:nextTrack",
|
||||||
"launcher:previousTrack",
|
activity.getString(R.string.fas_forward)
|
||||||
activity.getString(R.string.fas_back)))
|
)
|
||||||
|
)
|
||||||
|
othersList.add(
|
||||||
|
OtherInfo(
|
||||||
|
activity.getString(R.string.list_other_track_previous),
|
||||||
|
"launcher:previousTrack",
|
||||||
|
activity.getString(R.string.fas_back)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun returnChoiceIntent(forAction: String, value: String) {
|
private fun returnChoiceIntent(forAction: String, value: String) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue