Skip to content

Commit e7072ac

Browse files
committed
feat(AccountSwitcher): add missing empty view holder
1 parent 895c1d1 commit e7072ac

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package accountswitcher.settings
2+
3+
import android.content.Context
4+
import android.view.Gravity
5+
import android.widget.TextView
6+
import androidx.recyclerview.widget.RecyclerView
7+
import com.aliucord.utils.DimenUtils
8+
import com.lytefast.flexinput.R
9+
10+
class EmptyViewHolder(ctx: Context) :
11+
RecyclerView.ViewHolder(
12+
TextView(ctx, null, 0, R.i.UiKit_TextView_Medium).apply {
13+
text = "No accounts have been added."
14+
textSize = 16f
15+
gravity = Gravity.CENTER
16+
val p = DimenUtils.dpToPx(16)
17+
setPadding(p, p, p, p)
18+
}
19+
)

0 commit comments

Comments
 (0)