mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 00:39:54 +00:00
Add: Icon for details action
Improve: Smaller App name on top app bar
This commit is contained in:
parent
3296feecbe
commit
229a7a3c09
@ -1194,6 +1194,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
|||||||
when (action) {
|
when (action) {
|
||||||
Action.CANCEL -> context.getDrawable(R.drawable.ic_cancel)
|
Action.CANCEL -> context.getDrawable(R.drawable.ic_cancel)
|
||||||
Action.LAUNCH -> context.getDrawable(R.drawable.ic_launch)
|
Action.LAUNCH -> context.getDrawable(R.drawable.ic_launch)
|
||||||
|
Action.DETAILS -> context.getDrawable(R.drawable.ic_tune)
|
||||||
else -> context.getDrawable(R.drawable.ic_download)
|
else -> context.getDrawable(R.drawable.ic_download)
|
||||||
}
|
}
|
||||||
iconTint = if (action == Action.CANCEL) holder.actionTintOnCancel
|
iconTint = if (action == Action.CANCEL) holder.actionTintOnCancel
|
||||||
|
@ -29,6 +29,7 @@ import com.looker.droidify.utility.RxUtils
|
|||||||
import com.looker.droidify.utility.Utils
|
import com.looker.droidify.utility.Utils
|
||||||
import com.looker.droidify.utility.Utils.startUpdate
|
import com.looker.droidify.utility.Utils.startUpdate
|
||||||
import com.looker.droidify.utility.extension.android.*
|
import com.looker.droidify.utility.extension.android.*
|
||||||
|
import com.looker.droidify.utility.extension.text.trimAfter
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxjava3.core.Observable
|
import io.reactivex.rxjava3.core.Observable
|
||||||
import io.reactivex.rxjava3.disposables.Disposable
|
import io.reactivex.rxjava3.disposables.Disposable
|
||||||
@ -329,7 +330,8 @@ class ProductFragment() : ScreenFragment(), ProductAdapter.Callbacks {
|
|||||||
} == true
|
} == true
|
||||||
|
|
||||||
(toolbar.parent as CollapsingToolbarLayout).title =
|
(toolbar.parent as CollapsingToolbarLayout).title =
|
||||||
if (showPackageName) products[0].first.name else getString(R.string.application)
|
if (showPackageName) products[0].first.name.trimAfter(' ', 2)
|
||||||
|
else getString(R.string.application)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateToolbarButtons() {
|
private fun updateToolbarButtons() {
|
||||||
|
@ -27,7 +27,7 @@ fun String?.trimAfter(char: Char, repeated: Int): String? {
|
|||||||
if (repeated == count) return it.substring(0, i)
|
if (repeated == count) return it.substring(0, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String?.trimBefore(char: Char, repeated: Int): String? {
|
fun String?.trimBefore(char: Char, repeated: Int): String? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user