Skip to content

Commit

Permalink
feat: Addded Landscape layout for event editor activity
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxGalaxy committed Dec 29, 2023
1 parent 0702854 commit 65c4e1f
Show file tree
Hide file tree
Showing 2 changed files with 315 additions and 135 deletions.
174 changes: 174 additions & 0 deletions app/src/main/res/layout-land/activity_event_editor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"
android:layout_width="match_parent">

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$Behavior"
android:id="@+id/appbar">

<com.google.android.material.appbar.MaterialToolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
android:id="@+id/toolbar" />

</com.google.android.material.appbar.AppBarLayout>

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal">

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_height="match_parent"
android:layout_width="0dp"
android:orientation="vertical"
android:layout_weight="60">

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:orientation="vertical"
android:id="@+id/content">

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
android:gravity="center"
android:id="@+id/loading">

<ProgressBar
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:indeterminate="true"
android:id="@+id/progressbar" />

</LinearLayout>

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
android:gravity="center"
android:id="@+id/info">

<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="?attr/colorOnSurface"
android:id="@+id/tv_info" />

</LinearLayout>

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
android:gravity="center"
android:orientation="vertical"
android:id="@+id/stringEditor">

<editor.tsd.widget.CodeEditorLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:codeEditor="SoraCodeEditor"
android:layout_weight="1"
android:id="@+id/codeEditor" />

<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:weightSum="2"
android:gravity="center_horizontal"
android:padding="8dp"
android:orientation="horizontal">

<Button
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_marginEnd="4dp"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_weight="1"
android:id="@+id/cancel"
android:text="@string/cancel" />

<Button
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:id="@+id/done"
android:text="@string/done" />

</LinearLayout>

</LinearLayout>

<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:visibility="gone"
android:id="@+id/editor">

<com.dragon.ide.ui.view.editor.Editor
android:layout_height="match_parent"
android:layout_width="match_parent"
android:foregroundGravity="top"
android:padding="8dp"
android:orientation="vertical"
android:id="@+id/relativeBlockListEditorArea" />

</LinearLayout>

</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/block"
android:layout_margin="16dp"
android:id="@+id/fab"
android:layout_gravity="end|bottom" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

<LinearLayout
android:layout_height="match_parent"
android:layout_width="0dp"
android:visibility="gone"
android:background="?attr/colorSurfaceVariant"
android:orientation="horizontal"
android:layout_weight="40"
android:id="@+id/blockArea">

<androidx.recyclerview.widget.RecyclerView
android:layout_height="match_parent"
android:layout_width="0dp"
android:background="?attr/colorSurface"
android:layout_weight="35"
android:id="@+id/blocksHolderList" />

<androidx.recyclerview.widget.RecyclerView
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="65"
android:id="@+id/blockList" />

</LinearLayout>

</LinearLayout>

</LinearLayout>

</FrameLayout>
Loading

0 comments on commit 65c4e1f

Please sign in to comment.