class Colors() {
let colorsArray: [(name: String, r: Int)] = [("name1", 100), ("name2", 200)] и т.д.
}
public void addSections() {
sections.add(new Section("title1", "description1"));
sections.add(new Section("title2", "description2"));
}
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long id) {
Intent intent = new Intent(MainActivity.this, PaletteActivity.class);
intent.putExtra("nameS", sectionName[pos].toString());
startActivity(intent);
}
});
<TextView
android:id="@+id/descriptionLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="35dp"
android:layout_alignEnd="@+id/titleLabel"
android:layout_alignLeft="@+id/titleLabel"
android:layout_alignRight="@+id/titleLabel"
android:layout_alignStart="@+id/titleLabel"
android:layout_below="@+id/titleLabel"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:text="TextView"
android:textColor="@color/White_232"
android:textSize="14dp" />