[androidkit] add navigation spinner to demo

-add navigation ui element to demo layout
-simplify demo layout, inflates faster

Change-Id: I232bbc553cd0143893fc20e3c218fa5a6c4006ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411311
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Jorge Betancourt 2021-05-24 13:05:30 -04:00 committed by Skia Commit-Bot
parent 7f17d36c2c
commit 4453c9add2

View File

@ -1,93 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.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">
<LinearLayout
android:orientation="vertical"
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/navigator">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/skottie_container">
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/skottie_container">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/bitmapImage"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ImageView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
app:layout_constraintLeft_toRightOf="@+id/bitmapImage"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="ImageView populated by bitmap">
</TextView>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/bitmapImage"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ImageView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
app:layout_constraintLeft_toRightOf="@+id/bitmapImage"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="ImageView populated by bitmap">
</TextView>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<SurfaceView
android:id="@+id/threadedSurface"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</SurfaceView>
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<SurfaceView
android:id="@+id/threadedSurface"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</SurfaceView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
android:text="SurfaceView drawn on a thread managed by AndroidKit's native code"
app:layout_constraintLeft_toRightOf="@+id/threadedSurface"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
</TextView>
</android.support.constraint.ConstraintLayout>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
android:text="SurfaceView drawn on a thread managed by AndroidKit's native code"
app:layout_constraintLeft_toRightOf="@+id/threadedSurface"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
</TextView>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<SurfaceView
android:id="@+id/runtimeEffect"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</SurfaceView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
app:layout_constraintLeft_toRightOf="@+id/runtimeEffect"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="Runtime effect drawn on a AndroidKit's\nutil thread. GL on Surface View.">
</TextView>
<android.support.constraint.ConstraintLayout
android:layout_marginTop="50px"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<SurfaceView
android:id="@+id/runtimeEffect"
android:layout_width="400px"
android:layout_height="400px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
</SurfaceView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50px"
app:layout_constraintLeft_toRightOf="@+id/runtimeEffect"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="Runtime effect drawn on a AndroidKit's\nutil thread. GL on Surface View.">
</TextView>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</ScrollView>
<org.skia.androidkitdemo1.NavigationSpinner
android:id="@+id/navigator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent">
</org.skia.androidkitdemo1.NavigationSpinner>
</android.support.constraint.ConstraintLayout>