public Bicycle(int startGadence, int startSpeed, int startGear){ gear = startGear; cadence = startCadence; speed = startSpeed; }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="16dp"> <ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher" /> <LinearLayout android:id="@+id/text_container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingLeft="16dp"> <TextView android:id="@+id/miwok_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" tools:text="lutti" /> <TextView android:id="@+id/default_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" tools:text="one" /> </LinearLayout> </LinearLayout>
Change view visibility
textView.setVisibility(View.VISIBLE);
textView.setVisibility(View.INVISIBLE);
textView.setVisibility(View.GONE);