リアクションボタンのサイズ調整
@ -485,7 +485,7 @@ internal class ItemViewHolder(
|
||||
n.time_created_at,
|
||||
R.attr.ic_question,
|
||||
R.string.display_name_reaction_by
|
||||
, reaction?.drawableId
|
||||
, reaction?.btnDrawableId
|
||||
)
|
||||
if(n_status != null) showStatus(activity, n_status)
|
||||
|
||||
@ -1471,10 +1471,9 @@ internal class ItemViewHolder(
|
||||
val buttonHeight = ActMain.boostButtonSize
|
||||
val marginBetween = (ActMain.boostButtonSize.toFloat() * 0.05f + 0.5f).toInt()
|
||||
|
||||
val paddingH = (buttonHeight.toFloat() / 10 + 0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat() / 10 + 0.5f).toInt()
|
||||
val compoundPaddingDp =
|
||||
ActMain.boostButtonSize.toFloat() * 0.00f / activity.resources.displayMetrics.density
|
||||
val paddingH = (buttonHeight.toFloat() *0.1f + 0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat() *0.1f + 0.5f).toInt()
|
||||
val compoundPaddingDp = 0f // ActMain.boostButtonSize.toFloat() * 0f / activity.resources.displayMetrics.density
|
||||
|
||||
val box = FlexboxLayout(activity)
|
||||
val boxLp = LinearLayout.LayoutParams(
|
||||
@ -1517,7 +1516,7 @@ internal class ItemViewHolder(
|
||||
)
|
||||
b.minimumWidth = buttonHeight
|
||||
|
||||
b.imageResource = mr.drawableId
|
||||
b.imageResource = mr.btnDrawableId
|
||||
b.scaleType = ImageView.ScaleType.FIT_CENTER
|
||||
|
||||
b.layoutParams = blp
|
||||
|
@ -369,9 +369,9 @@ class StatusButtonsViewHolder(
|
||||
private val buttonHeight = ActMain.boostButtonSize
|
||||
private val marginBetween = (ActMain.boostButtonSize.toFloat() * 0.05f + 0.5f).toInt()
|
||||
|
||||
val paddingH = (buttonHeight.toFloat()/10 +0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat()/10 +0.5f).toInt()
|
||||
val compoundPaddingDp = ActMain.boostButtonSize.toFloat() * -0.085f / activity.resources.displayMetrics.density
|
||||
val paddingH = (buttonHeight.toFloat()*0.1f +0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat()*0.1f +0.5f).toInt()
|
||||
val compoundPaddingDp = 0f // ActMain.boostButtonSize.toFloat() * -0f / activity.resources.displayMetrics.density
|
||||
|
||||
val viewRoot : FlexboxLayout
|
||||
|
||||
|
@ -2,25 +2,30 @@ package jp.juggler.subwaytooter.api.entity
|
||||
|
||||
import jp.juggler.subwaytooter.R
|
||||
|
||||
enum class MisskeyReaction(val shortcode:String,val drawableId:Int){
|
||||
|
||||
|
||||
Like("like", R.drawable.emj_1f44d),
|
||||
Love("love",R.drawable.emj_2665),
|
||||
Laugh("laugh",R.drawable.emj_1f606),
|
||||
Hmm("hmm", R.drawable.emj_1f914),
|
||||
Surprise("surprise",R.drawable.emj_1f62e),
|
||||
Congrats("congrats",R.drawable.emj_1f389),
|
||||
Angry("angry",R.drawable.emj_1f4a2),
|
||||
Confused("confused",R.drawable.emj_1f625),
|
||||
Rip("rip", R.drawable.emj_1f607),
|
||||
Pudding("pudding", R.drawable.emj_1f36e) ;
|
||||
|
||||
enum class MisskeyReaction(
|
||||
val shortcode : String,
|
||||
val drawableId : Int,
|
||||
val btnDrawableId : Int
|
||||
) {
|
||||
|
||||
Like("like", R.drawable.emj_1f44d, R.drawable.btn_reaction_angry),
|
||||
Love("love", R.drawable.emj_2665, R.drawable.btn_reaction_confused),
|
||||
Laugh("laugh", R.drawable.emj_1f606, R.drawable.btn_reaction_congrats),
|
||||
Hmm("hmm", R.drawable.emj_1f914, R.drawable.btn_reaction_hmm),
|
||||
Surprise("surprise", R.drawable.emj_1f62e, R.drawable.btn_reaction_laugh),
|
||||
Congrats("congrats", R.drawable.emj_1f389, R.drawable.btn_reaction_like),
|
||||
Angry("angry", R.drawable.emj_1f4a2, R.drawable.btn_reaction_love),
|
||||
Confused("confused", R.drawable.emj_1f625, R.drawable.btn_reaction_pudding),
|
||||
Rip("rip", R.drawable.emj_1f607, R.drawable.btn_reaction_rip),
|
||||
Pudding("pudding", R.drawable.emj_1f36e, R.drawable.btn_reaction_surprise)
|
||||
|
||||
;
|
||||
|
||||
companion object {
|
||||
val shortcodeMap: HashMap<String,MisskeyReaction> by lazy {
|
||||
HashMap<String,MisskeyReaction>().apply {
|
||||
for( e in MisskeyReaction.values()){
|
||||
put( e.shortcode,e)
|
||||
val shortcodeMap : HashMap<String, MisskeyReaction> by lazy {
|
||||
HashMap<String, MisskeyReaction>().apply {
|
||||
for(e in MisskeyReaction.values()) {
|
||||
put(e.shortcode, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-hdpi/btn_reaction_angry.webp
Normal file
After Width: | Height: | Size: 838 B |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_confused.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_congrats.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_hmm.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_laugh.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_like.webp
Normal file
After Width: | Height: | Size: 948 B |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_love.webp
Normal file
After Width: | Height: | Size: 470 B |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_pudding.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_rip.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-hdpi/btn_reaction_surprise.webp
Normal file
After Width: | Height: | Size: 782 B |
Before Width: | Height: | Size: 1022 B |
BIN
app/src/main/res/drawable-hdpi/ic_cat.webp
Normal file
After Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 534 B |
BIN
app/src/main/res/drawable-hdpi/ic_mobile.webp
Normal file
After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 819 B |
BIN
app/src/main/res/drawable-hdpi/ic_shield.webp
Normal file
After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 791 B |
BIN
app/src/main/res/drawable-hdpi/ic_vote.webp
Normal file
After Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 697 B |
BIN
app/src/main/res/drawable-hdpi/ic_vote_dark.webp
Normal file
After Width: | Height: | Size: 460 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_angry.webp
Normal file
After Width: | Height: | Size: 584 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_confused.webp
Normal file
After Width: | Height: | Size: 822 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_congrats.webp
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_hmm.webp
Normal file
After Width: | Height: | Size: 806 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_laugh.webp
Normal file
After Width: | Height: | Size: 786 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_like.webp
Normal file
After Width: | Height: | Size: 678 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_love.webp
Normal file
After Width: | Height: | Size: 350 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_pudding.webp
Normal file
After Width: | Height: | Size: 906 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_rip.webp
Normal file
After Width: | Height: | Size: 908 B |
BIN
app/src/main/res/drawable-mdpi/btn_reaction_surprise.webp
Normal file
After Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 688 B |
BIN
app/src/main/res/drawable-mdpi/ic_cat.webp
Normal file
After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 446 B |
BIN
app/src/main/res/drawable-mdpi/ic_mobile.webp
Normal file
After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 622 B |
BIN
app/src/main/res/drawable-mdpi/ic_shield.webp
Normal file
After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 539 B |
BIN
app/src/main/res/drawable-mdpi/ic_vote.webp
Normal file
After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 461 B |
BIN
app/src/main/res/drawable-mdpi/ic_vote_dark.webp
Normal file
After Width: | Height: | Size: 314 B |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_angry.webp
Normal file
After Width: | Height: | Size: 992 B |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_confused.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_congrats.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_hmm.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_laugh.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_like.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_love.webp
Normal file
After Width: | Height: | Size: 562 B |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_pudding.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_rip.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/btn_reaction_surprise.webp
Normal file
After Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_cat.webp
Normal file
After Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 577 B |
BIN
app/src/main/res/drawable-xhdpi/ic_mobile.webp
Normal file
After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_shield.webp
Normal file
After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_vote.webp
Normal file
After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 910 B |
BIN
app/src/main/res/drawable-xhdpi/ic_vote_dark.webp
Normal file
After Width: | Height: | Size: 584 B |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_angry.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_confused.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_congrats.webp
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_hmm.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_laugh.webp
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_like.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_love.webp
Normal file
After Width: | Height: | Size: 736 B |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_pudding.webp
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_rip.webp
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/btn_reaction_surprise.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_cat.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 680 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_mobile.webp
Normal file
After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_shield.webp
Normal file
After Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_vote.webp
Normal file
After Width: | Height: | Size: 954 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_vote_dark.webp
Normal file
After Width: | Height: | Size: 836 B |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_angry.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_confused.webp
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_congrats.webp
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_hmm.webp
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_laugh.webp
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_like.webp
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_love.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_pudding.webp
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_rip.webp
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/btn_reaction_surprise.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_cat.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 888 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_mobile.webp
Normal file
After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_shield.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
@ -124,4 +124,17 @@ my $res_dir = "app/src/main/res";
|
||||
|
||||
#resize_scales( "_ArtWork/ic_cat.png" ,$res_dir,"drawable","ic_cat",0,24);
|
||||
#resize_scales( "_ArtWork/ic_shield.png" ,$res_dir,"drawable","ic_shield",0,24);
|
||||
resize_scales( "_ArtWork/ic_mobile.png" ,$res_dir,"drawable","ic_mobile",0,24);
|
||||
#resize_scales( "_ArtWork/ic_mobile.png" ,$res_dir,"drawable","ic_mobile",0,24);
|
||||
|
||||
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_angry.png" ,$res_dir,"drawable","btn_reaction_angry",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_confused.png" ,$res_dir,"drawable","btn_reaction_confused",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_congrats.png" ,$res_dir,"drawable","btn_reaction_congrats",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_hmm.png" ,$res_dir,"drawable","btn_reaction_hmm",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_laugh.png" ,$res_dir,"drawable","btn_reaction_laugh",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_like.png" ,$res_dir,"drawable","btn_reaction_like",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_love.png" ,$res_dir,"drawable","btn_reaction_love",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_pudding.png" ,$res_dir,"drawable","btn_reaction_pudding",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_rip.png" ,$res_dir,"drawable","btn_reaction_rip",0,32);
|
||||
resize_scales( "_ArtWork/misskey-reaction/btn_reaction_surprise.png" ,$res_dir,"drawable","btn_reaction_surprise",0,32);
|
||||
|
||||
|