JohnWayneeee/cleantv / skills/android-tv-setup
android-tv-setup
UnverifiedSet up an Android TV or Google TV over network ADB - back up, debloat with the owner's choices, switch off screen recognition (ACR) and take the microphone and camera away from vendor apps, tune performance, set picture and sound like a calibrator, replace the home screen with a clean Apple TV style launcher, and set up a YouTube DPI bypass (ByeByeDPI) where the ISP throttles YouTube, verifying every step with screenshots from the TV. Use when the user wants to debloat, clean up, speed up, configure, calibrate or replace the launcher on an Android TV / Google TV set or box (Xiaomi, TCL, Hisense, Sony, Philips, CHiQ/Changhong, Haier, Nvidia Shield and others). Not for Samsung Tizen, LG webOS or Fire TV launchers.
launcher/app/src/main/java/com/cleantv/launcher/TileAdapter.java
View on GitHubpackage com.cleantv.launcher;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
final class TileAdapter extends RecyclerView.Adapter<TileAdapter.Holder> {
static final class Holder extends RecyclerView.ViewHolder {
final View card;
final ImageView image;
final TextView label;
Holder(View v) {
super(v);
card = v.findViewById(R.id.card);
image = v.findViewById(R.id.image);
label = v.findViewById(R.id.label);
}
}
private final List<AppRepository.App> apps;
private final int cardHeight, gap;
private final float radius;
private final Typeface font;
private final boolean fadeIn;
/** fadeIn: the images appear on their plates, used once when the tiles replace the skeletons. */
TileAdapter(List<AppRepository.App> apps, int cardHeight, int gap, float radius, Typeface font, boolean fadeIn) {
this.apps = apps;
this.cardHeight = cardHeight;
this.gap = gap;
this.radius = radius;
this.font = font;
this.fadeIn = fadeIn;
}
@NonNull
@Override
public Holder onCreateViewHolder(@NonNull ViewGroup parent, int type) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_tile, parent, false);
v.setPadding(gap / 2, 0, gap / 2, 0);
Holder h = new Holder(v);
h.card.getLayoutParams().height = cardHeight;
h.card.setClipToOutline(true);
h.label.setTypeface(font);
return h;
}
@Override
public void onBindViewHolder(@NonNull Holder h, int pos) {
AppRepository.App a = apps.get(pos);
GradientDrawable bg = new GradientDrawable();
bg.setCornerRadius(radius);
if (a.isBanner) {
bg.setColor(0xFF1C1C1E);
h.image.setScaleType(ImageView.ScaleType.CENTER_CROP);
h.image.setPadding(0, 0, 0, 0);
} else {
float[] hsv = new float[3];
Color.colorToHSV(a.color, hsv);
hsv[2] *= 0.32f;
bg.setColor(Color.HSVToColor(hsv));
int p = (int) (cardHeight * 0.2f);
h.image.setScaleType(ImageView.ScaleType.FIT_CENTER);
h.image.setPadding(p, p, p, p);
}
h.card.setBackground(bg);
h.image.setImageDrawable(a.image);
if (fadeIn) {
h.image.setAlpha(0f);
h.image.animate().alpha(1).setDuration(300).start();
} else {
h.image.setAlpha(1f);
}
h.label.setText(a.label);
h.label.setAlpha(0);
h.card.setScaleX(1);
h.card.setScaleY(1);
}
@Override
public int getItemCount() {
return apps.size();
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |