add SurfaceDuoLayout preview (#10)
This commit is contained in:
Родитель
83d7022346
Коммит
8c75d35325
|
@ -44,6 +44,6 @@ dependencies {
|
|||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.0.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
app:dual_screen_end_layout_id="@layout/dual_screen_end_layout"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout"
|
||||
app:dual_screen_start_layout_id="@layout/single_screen_layout"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout" />
|
||||
app:dual_screen_end_layout_id="@layout/dual_screen_end_layout"
|
||||
app:tools_screen_mode="dual_screen"/>
|
|
@ -36,5 +36,5 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:dual_screen_end_layout_id="@layout/tools_dual_screen"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout"
|
||||
app:dual_screen_start_layout_id="@layout/picture_dual_screen"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout" />
|
||||
app:dual_screen_end_layout_id="@layout/tools_dual_screen"
|
||||
app:tools_screen_mode="dual_screen"
|
||||
app:tools_hinge_color="white" />
|
||||
|
|
|
@ -58,5 +58,5 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
<com.microsoft.device.dualscreen.layout.SurfaceDuoLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:single_screen_layout_id="@layout/single_screen" />
|
||||
app:single_screen_layout_id="@layout/single_screen"
|
||||
app:show_in_dual_screen_start="@layout/drag_source_layout"
|
||||
app:show_in_dual_screen_end="@layout/drop_target_layout"
|
||||
app:tools_screen_mode="dual_screen"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/reset_button"
|
||||
|
|
|
@ -56,5 +56,5 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -5,12 +5,15 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<com.microsoft.device.dualscreen.layout.SurfaceDuoLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.microsoft.device.dualscreen.layout.SurfaceDuoLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/activity_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:dual_screen_end_layout_id="@layout/dual_screen_end_layout"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout"
|
||||
app:dual_screen_start_layout_id="@layout/dual_screen_start_layout"
|
||||
app:single_screen_layout_id="@layout/single_screen_layout" />
|
||||
app:dual_screen_end_layout_id="@layout/dual_screen_end_layout"
|
||||
app:show_in_single_screen="@layout/fragment_items_list"
|
||||
app:show_in_dual_screen_start="@layout/fragment_items_list"
|
||||
app:show_in_dual_screen_end="@layout/fragment_item_detail"
|
||||
app:tools_screen_mode="dual_screen"/>
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/dual_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapFragment"/>
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapFragment"
|
||||
tools:layout="@layout/fragment_item_detail" />
|
|
@ -8,10 +8,12 @@
|
|||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/dual_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapPointListFragment"/>
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapPointListFragment"
|
||||
tools:showIn="@layout/fragment_items_list" />
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@android:color/white"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -28,13 +29,16 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
android:padding="0dp"
|
||||
android:scaleType="matrix"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:padding="0dp"
|
||||
android:scaleType="matrix"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/detail_toolbar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/detail_toolbar"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:src="@drawable/san_francisco" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
@ -32,7 +33,8 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/list_toolbar">
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/list_toolbar"
|
||||
tools:listitem="@android:layout/simple_selectable_list_item">
|
||||
</ListView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/single_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapPointListFragment" />
|
||||
android:name="com.microsoft.device.display.samples.contentcontext.MapPointListFragment"
|
||||
tools:layout="@layout/fragment_items_list" />
|
||||
|
|
|
@ -50,6 +50,7 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
}
|
||||
|
|
|
@ -57,5 +57,5 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -6,5 +6,10 @@
|
|||
-->
|
||||
<com.microsoft.device.dualscreen.layout.SurfaceDuoLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
app:show_in_dual_screen_start="@layout/fragment_items_list"
|
||||
app:show_in_dual_screen_end="@layout/fragment_item_detail"
|
||||
app:show_in_single_screen="@layout/fragment_items_list"
|
||||
app:tools_screen_mode="dual_screen"/>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
|
@ -17,6 +17,7 @@
|
|||
android:layout_height="100dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
tools:src="@drawable/ic_movie_black_24dp"
|
||||
android:contentDescription="@string/item_image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -5,13 +5,39 @@
|
|||
~ Licensed under the MIT License.
|
||||
~
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
<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_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/items_list"
|
||||
android:padding="@dimen/list_title_padding"
|
||||
android:textSize="@dimen/list_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@android:color/darker_gray"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView4"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:listitem="@layout/support_simple_spinner_dropdown_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~
|
||||
~ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
~ Licensed under the MIT License.
|
||||
~
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<dimen name="list_title">16sp</dimen>
|
||||
<dimen name="list_title_padding">16dp</dimen>
|
||||
</resources>
|
|
@ -10,4 +10,5 @@
|
|||
<string name="details">Details:</string>
|
||||
<string name="note">Title:</string>
|
||||
<string name="item_image">Item image</string>
|
||||
<string name="items_list">Items List</string>
|
||||
</resources>
|
||||
|
|
|
@ -39,5 +39,5 @@ dependencies {
|
|||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -56,5 +56,5 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.0'
|
||||
implementation 'com.microsoft.device:dualscreen-layout:0.9.2'
|
||||
}
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
#
|
||||
#
|
||||
|
||||
#Wed Nov 13 13:53:34 CST 2019
|
||||
#Wed Apr 08 16:25:58 EEST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
|
|
Загрузка…
Ссылка в новой задаче