mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-12-06 16:27:16 +00:00
Public source code release
This commit is contained in:
1 parent
20b730b1c8
commit
0b2ba24c7f
6691 files changed
+2325292
-1
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package ru.ytkab0bp.slicebeam.recycler;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import ru.ytkab0bp.slicebeam.theme.ThemesRepo;
|
||||
import ru.ytkab0bp.slicebeam.utils.ViewUtils;
|
||||
|
||||
public class BigHeaderItem extends SimpleRecyclerItem<TextView> {
|
||||
public String title;
|
||||
|
||||
public BigHeaderItem() {}
|
||||
|
||||
public BigHeaderItem(String t) {
|
||||
title = t;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextView onCreateView(Context ctx) {
|
||||
TextView tv = new TextView(ctx);
|
||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);
|
||||
tv.setTypeface(ViewUtils.getTypeface(ViewUtils.ROBOTO_MEDIUM));
|
||||
tv.setTextColor(ThemesRepo.getColor(android.R.attr.textColorPrimary));
|
||||
tv.setPadding(ViewUtils.dp(21), ViewUtils.dp(12), ViewUtils.dp(21), ViewUtils.dp(12));
|
||||
tv.setGravity(Gravity.START);
|
||||
tv.setLayoutParams(new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
return tv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindView(TextView view) {
|
||||
view.setText(title);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user