SimpleList

A simplified vertical RecyclerView subclass that maps list arrays directly to actionable buttons with click and long-click listeners.

Methods

void addItem(String item) / void removeItem(int position) / void clear()

Mutates the list data. Automatically triggers an internal adapter refresh to update UI bounds.

void setItemPadding(int valueDp)

Applies uniform item padding (in DP) to all four edges of the list element buttons.

void setItemPadding(int left, int top, int right, int bottom)

Sets custom, independent padding values (in DP) for each edge of the list buttons.

Usage Example

JAVA
SimpleList list = findViewById(R.id.simple_list);
list.addItem("Launch Server");
list.addItem("Database Backup");

list.setOnItemClickListener(position -> {
    String task = list.getData().get(position);
    Toast.makeText(context, "Clicked: " + task, Toast.LENGTH_SHORT).show();
});