+ Show only apps and no other intents in the list choosable as an action 
('view' rather than 'pick')
+ Change text for 'other' intents (+="Launcher ")
This commit is contained in:
Finn M Glas 2020-06-16 09:47:36 +02:00
parent 193df99624
commit f6fdd70995
No known key found for this signature in database
GPG key ID: 902A30146014DFBF
2 changed files with 7 additions and 3 deletions

View file

@ -50,8 +50,8 @@ class OtherRecyclerAdapter(val activity: Activity):
init {
othersList = ArrayList()
othersList.add(OtherInfo("Settings", "launcher:settings"))
othersList.add(OtherInfo("AppsList", "launcher:choose"))
othersList.add(OtherInfo("Launcher Settings", "launcher:settings"))
othersList.add(OtherInfo("Launcher AppsList", "launcher:choose"))
}
/* */

View file

@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat.startActivity
import com.finnmglas.launcher.ChooseActivity
import com.finnmglas.launcher.R
import com.finnmglas.launcher.SettingsActivity
import com.finnmglas.launcher.intendedSettingsPause
import kotlin.math.roundToInt
@ -222,7 +223,10 @@ fun openSettings(activity: Activity){
}
fun openAppsList(activity: Activity){
activity.startActivity(Intent(activity, ChooseActivity::class.java))
val intent = Intent(activity, ChooseActivity::class.java)
intent.putExtra("action", "view")
intendedSettingsPause = true
activity.startActivity(intent)
activity.overridePendingTransition(R.anim.bottom_up, android.R.anim.fade_out)
}