Skip to content

Commit

Permalink
#65 feat: 본문 ScrollView 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyesung82 committed Mar 8, 2023
1 parent 53363a6 commit 42c2a85
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 60 deletions.
135 changes: 75 additions & 60 deletions presentation/src/main/res/layout/fragment_write.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@
style="@style/root_layout_default"
tools:context=".ui.write.WriteFragment">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_write_start"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/space_median" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_write_end"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_end="@dimen/space_median" />

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_write"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -44,52 +30,81 @@
app:title="@string/write_title"
style="@style/common_toolbar" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_write_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_median"
android:text="@string/common_title"
android:textSize="@dimen/text_s_large"
android:textColor="@color/black"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintTop_toBottomOf="@id/toolbar_write" />

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/et_write_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_x_small"
android:background="@null"
android:inputType="text"
android:maxLines="1"
android:textSize="@dimen/text_s_large"
android:hint="@string/write_title_hint"
android:maxLength="20"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end"
app:layout_constraintStart_toStartOf="@id/guideline_write_start"
app:layout_constraintTop_toBottomOf="@id/tv_write_title" />

<View
android:id="@+id/view_write_line"
android:layout_width="0dp"
android:layout_height="@dimen/common_divider_height"
android:layout_marginTop="@dimen/space_small"
android:background="@color/black"
app:layout_constraintTop_toBottomOf="@id/et_write_title"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end" />

<jp.wasabeef.richeditor.RichEditor
android:id="@+id/editor_write"
android:layout_width="0dp"
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/space_median"
app:layout_constraintBottom_toTopOf="@id/view_write_tools_background"
app:layout_constraintTop_toBottomOf="@id/view_write_line"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end" />
app:layout_constraintTop_toBottomOf="@id/toolbar_write"
app:layout_constraintBottom_toTopOf="@id/view_write_tools_background">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="@dimen/space_median">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_write_start"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/space_median" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_write_end"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_end="@dimen/space_median" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_write_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/common_title"
android:textSize="@dimen/text_s_large"
android:textColor="@color/black"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/et_write_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_x_small"
android:background="@null"
android:inputType="text"
android:maxLines="1"
android:textSize="@dimen/text_s_large"
android:hint="@string/write_title_hint"
android:maxLength="20"
android:theme="@style/Theme.MapZ.EditText.Editor"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end"
app:layout_constraintStart_toStartOf="@id/guideline_write_start"
app:layout_constraintTop_toBottomOf="@id/tv_write_title" />

<View
android:id="@+id/view_write_line"
android:layout_width="0dp"
android:layout_height="@dimen/common_divider_height"
android:layout_marginTop="@dimen/space_small"
android:background="@color/black"
app:layout_constraintTop_toBottomOf="@id/et_write_title"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end" />

<jp.wasabeef.richeditor.RichEditor
android:id="@+id/editor_write"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_median"
android:theme="@style/Theme.MapZ.EditText.Editor"
app:layout_constraintTop_toBottomOf="@id/view_write_line"
app:layout_constraintStart_toEndOf="@id/guideline_write_start"
app:layout_constraintEnd_toStartOf="@id/guideline_write_end" />

</androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>

<View
android:id="@+id/view_write_tools_background"
Expand Down Expand Up @@ -239,7 +254,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:listitem="@layout/item_write_sticker"
tools:visibility="visible" />
tools:visibility="invisible" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_write_image"
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<color name="picture_gallery_desc_text_color">#FF6D6D6D</color>
<color name="location_picture_list_bg_color">#BF525252</color>
<color name="write_editor_text_color">@color/grey_dark</color>
<color name="write_editor_cursor_color">#FF0000</color>
<color name="write_tool_color_red">#FF3535</color>
<color name="write_tool_color_orange">#FF9635</color>
<color name="write_tool_color_yellow">#FBFF35</color>
Expand Down
6 changes: 6 additions & 0 deletions presentation/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@
<item name="android:drawableTint">@color/grey_dark</item>
<item name="android:textCursorDrawable">@drawable/bg_cursor</item>
</style>

<style name="Theme.MapZ.EditText.Editor" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorControlActivated">@color/write_editor_cursor_color</item>
<item name="android:colorAccent">@color/write_editor_cursor_color</item>
<item name="android:textCursorDrawable">@color/write_editor_cursor_color</item>
</style>
</resources>

0 comments on commit 42c2a85

Please sign in to comment.