Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

마인드맵 화면 구성 #67

Merged
merged 6 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AOS/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:theme="@style/Theme.MindSync"
tools:targetApi="31">
<activity
android:name="MainActivity"
android:name=".ui.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package boostcamp.and07.mindsync
package boostcamp.and07.mindsync.ui

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import boostcamp.and07.mindsync.R

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package boostcamp.and07.mindsync.ui.mindmap

import boostcamp.and07.mindsync.R
import boostcamp.and07.mindsync.databinding.FragmentMindmapBinding
import boostcamp.and07.mindsync.ui.base.BaseFragment

class MindmapFragment : BaseFragment<FragmentMindmapBinding>(R.layout.fragment_mindmap) {
override fun initView() {
}
}
10 changes: 10 additions & 0 deletions AOS/app/src/main/res/drawable/ic_remove.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="25dp"
android:tint="#000000"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13L7,13v-2h10v2z" />
</vector>
26 changes: 6 additions & 20 deletions AOS/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".ui.MainActivity">

<boostcamp.and07.mindsync.ui.view.LineView
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main_nav_host"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<boostcamp.and07.mindsync.ui.view.NodeView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="match_parent"
app:navGraph="@navigation/nav_graph" />

</androidx.constraintlayout.widget.ConstraintLayout>
78 changes: 78 additions & 0 deletions AOS/app/src/main/res/layout/fragment_mindmap.xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

바텀바의 영역이 너무 모호해서 색깔 바꾸면 좋을거같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gray1 에서 gray2로 변경했습니다~!

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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">

<data>

</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.mindmap.MindmapFragment">

<boostcamp.and07.mindsync.ui.view.LineView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/ll_mindmap_bottom_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<boostcamp.and07.mindsync.ui.view.NodeView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/ll_mindmap_bottom_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<LinearLayout
android:id="@+id/ll_mindmap_bottom_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/gray2"
android:orientation="horizontal"
android:paddingHorizontal="30dp"
android:paddingVertical="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<ImageButton
android:id="@+id/imgbtn_mindmap_add"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:src="@drawable/ic_add" />

<ImageButton
android:id="@+id/imgbtn_mindmap_remove"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:src="@drawable/ic_remove" />

<ImageButton
android:id="@+id/imgbtn_mindmap_edit"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:src="@drawable/ic_outlined_drawing" />

<ImageButton
android:id="@+id/imgbtn_mindmap_back"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:src="@drawable/ic_undo" />

</LinearLayout>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

노드 선택 시 BottomBar 숨김 처리를 위해 LinearLayout을 사용하신 것 같아요. 그런데 ConstraintLayout의 Group 기능을 활용하면 visibility 관리가 더욱 용이해질 거예요. 또한, 요소들 사이의 간격을 조절할 때는 ConstraintLayout의 chainStyle을 사용해 보시는 것도 좋은 선택일 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 반영했습니다 ㅎㅎ


</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
11 changes: 11 additions & 0 deletions AOS/app/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_graph"
app:startDestination="@id/mindmapFragment">

<fragment
android:id="@+id/mindmapFragment"
android:name="boostcamp.and07.mindsync.ui.mindmap.MindmapFragment"
android:label="MindmapFragment" />
</navigation>