Mercurial > dwindows
changeset 2479:54b0008a0569
Android: Set the window text on the activity in dw_window_new().
Also remove the now unnecessary dwindows_main.xml since we generate our
layout ourselves.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 24 Apr 2021 21:28:57 +0000 |
parents | b0230e378667 |
children | 878d36588aaa |
files | android/DWindows.kt android/dwindows_main.xml |
diffstat | 2 files changed, 1 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/android/DWindows.kt Fri Apr 23 10:40:57 2021 +0000 +++ b/android/DWindows.kt Sat Apr 24 21:28:57 2021 +0000 @@ -32,6 +32,7 @@ { var windowLayout: LinearLayout = LinearLayout(this) setContentView(windowLayout) + this.title = title // For now we just return our DWindows' main activity layout... // in the future, later calls should create new activities return windowLayout
--- a/android/dwindows_main.xml Fri Apr 23 10:40:57 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -<?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/sample_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Hello World!" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file