2
I need to change the visibility of an xml layout when the device orientation is from Portrait (standing) to Landscape (lying down). I intend to add 2 columns when performing this action. I used the code android:visibility="gone" to hide, but I’m not finding a way to change to android:visibility="visibility" when the Guideline is amended.
Follow full code below.
<LinearLayout
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_weight="1"
  android:orientation="vertical"
  android:visibility="gone">
  <Button
      android:id="@+id/btnPer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@drawable/button_green"
      android:text="@string/Btn_Per"
      android:textColor="@color/gray"
      android:textSize="18sp" />
  <Button
      android:id="@+id/btnQuad"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@drawable/button_green"
      android:text="@string/Btn_Quad"
      android:textColor="@color/gray"
      android:textSize="18sp" />
  <Button
      android:id="@+id/btnRaiz"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@drawable/button_green"
      android:text="@string/Btn_Raiz"
      android:textColor="@color/gray"
      android:textSize="18sp" />
  <Button
      android:id="@+id/btnUm"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@drawable/button_green"
      android:text="@string/Btn_Um"
      android:textColor="@color/gray"
      android:textSize="18sp" />
  <Button
      android:id="@+id/btnMod"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@drawable/button_green"
      android:text="@string/Btn_Mod"
      android:textColor="@color/gray"
      android:textSize="18sp" />
</LinearLayout>