diff --git a/e01-first-application/app/src/main/res/layout-land/activity_main.xml b/e01-first-application/app/src/main/res/layout-land/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..14f6ea41299c03b41bcda1aae48db1e6a500e59c --- /dev/null +++ b/e01-first-application/app/src/main/res/layout-land/activity_main.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <TextView + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Hello World!" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <Button + android:id="@+id/button2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="40dp" + android:onClick="buttonClicked" + android:text="@string/button_txt" + app:layout_constraintBottom_toTopOf="@+id/textView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + tools:text="@string/button_txt" /> + + <TextView + android:id="@+id/textView2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="40dp" + android:text="@string/landscape_txt" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/e01-first-application/app/src/main/res/layout/activity_main.xml b/e01-first-application/app/src/main/res/layout/activity_main.xml index e036337072ddded8e8a9a34dc68cb4616360e270..36e369df47756a2841fd05d5cecb32a362689420 100644 --- a/e01-first-application/app/src/main/res/layout/activity_main.xml +++ b/e01-first-application/app/src/main/res/layout/activity_main.xml @@ -28,4 +28,14 @@ app:layout_constraintStart_toStartOf="parent" tools:text="@string/button_txt" /> + <TextView + android:id="@+id/textView2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="40dp" + android:text="@string/portrait_txt" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/e01-first-application/app/src/main/res/values-fi/strings.xml b/e01-first-application/app/src/main/res/values-fi/strings.xml index f00a07920584b46f0c9cd40b048ad9a0e08f14ff..407e2db81b8f78ae2ae4cc6b64f851a22ace0427 100644 --- a/e01-first-application/app/src/main/res/values-fi/strings.xml +++ b/e01-first-application/app/src/main/res/values-fi/strings.xml @@ -3,4 +3,6 @@ <string name="app_name">First Application(fi)</string> <string name="button_txt">Click me!(fi)</string> <string name="button_clicked_txt">Button clicked!(fi)</string> + <string name="portrait_txt">Portrait fi</string> + <string name="landscape_txt">Landscape fi</string> </resources> \ No newline at end of file diff --git a/e01-first-application/app/src/main/res/values/strings.xml b/e01-first-application/app/src/main/res/values/strings.xml index 81bec1e16523e4cb40d71621a91c5ec3339d26a1..1640f774feec9091a13da42077342ded195ae5b9 100644 --- a/e01-first-application/app/src/main/res/values/strings.xml +++ b/e01-first-application/app/src/main/res/values/strings.xml @@ -2,4 +2,6 @@ <string name="app_name">First Application</string> <string name="button_txt">Click Me!</string> <string name="button_clicked_txt">Button was clicked!</string> + <string name="portrait_txt">Portrait orientation</string> + <string name="landscape_txt">Landscape orientation</string> </resources> \ No newline at end of file