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

로그인 화면 구성 #91

Merged
merged 5 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.CatchyTape">
<activity
android:name=".MainActivity"
android:name=".feature.login.LoginActivity"
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,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/black" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<foreground android:drawable="@drawable/ic_launcher_icon" />
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/black" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<foreground android:drawable="@drawable/ic_launcher_icon" />
</adaptive-icon>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<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/home_nav_graph">
app:startDestination="@id/login_nav_graph">

<include app:graph="@navigation/home_navigation" />
<include app:graph="@navigation/login_navigation" />

</navigation>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AndroidFeaturePlugin : Plugin<Project> {
dependencies {
add("implementation", project(":core:ui"))
add("implementation", project(":core:domain"))
add("implementation", libs.findLibrary("timber").get())

add("testImplementation", libs.findLibrary("junit").get())
}
Expand Down
7 changes: 7 additions & 0 deletions android/core/ui/src/main/res/drawable/btn_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/light_gray" />
<corners android:radius="@dimen/login_radius" />

</shape>
18 changes: 18 additions & 0 deletions android/core/ui/src/main/res/drawable/ic_google.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M21.806,10.042H21V10H12V14H17.652C16.827,16.329 14.611,18 12,18C8.686,18 6,15.314 6,12C6,8.686 8.686,6 12,6C13.53,6 14.921,6.577 15.981,7.519L18.809,4.691C17.023,3.026 14.634,2 12,2C6.477,2 2,6.477 2,12C2,17.522 6.477,22 12,22C17.522,22 22,17.522 22,12C22,11.33 21.931,10.675 21.806,10.042Z"
android:fillColor="#FFC107"/>
<path
android:pathData="M3.153,7.345L6.439,9.755C7.328,7.554 9.481,6 12,6C13.53,6 14.921,6.577 15.981,7.519L18.809,4.691C17.023,3.026 14.634,2 12,2C8.159,2 4.828,4.168 3.153,7.345Z"
android:fillColor="#FF3D00"/>
<path
android:pathData="M12,22C14.583,22 16.93,21.011 18.704,19.404L15.609,16.785C14.572,17.574 13.304,18.001 12,18C9.399,18 7.19,16.341 6.358,14.027L3.097,16.539C4.752,19.778 8.113,22 12,22Z"
android:fillColor="#4CAF50"/>
<path
android:pathData="M21.806,10.042H21V10H12V14H17.652C17.257,15.108 16.547,16.077 15.608,16.785L15.609,16.785L18.705,19.403C18.486,19.603 22,17 22,12C22,11.33 21.931,10.675 21.806,10.042Z"
android:fillColor="#1976D2"/>
</vector>
34 changes: 34 additions & 0 deletions android/core/ui/src/main/res/drawable/ic_login_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="600"
android:viewportHeight="600">
<group android:scaleX="1"
android:scaleY="1"
android:translateX="0"
android:translateY="0">
<path
android:pathData="M80,150L520,150A30,30 0,0 1,550 180L550,420A30,30 0,0 1,520 450L80,450A30,30 0,0 1,50 420L50,180A30,30 0,0 1,80 150z"
android:fillColor="#BB2649"/>
<path
android:pathData="M100,204h400v193h-400z"
android:fillColor="#000000"/>
<path
android:pathData="M405,300m-35,0a35,35 0,1 1,70 0a35,35 0,1 1,-70 0"
android:fillColor="#ffffff"/>
<path
android:pathData="M195,300m-35,0a35,35 0,1 1,70 0a35,35 0,1 1,-70 0"
android:fillColor="#ffffff"/>
<path
android:pathData="M265,347C290.2,367 321.83,355.33 334.5,347"
android:strokeWidth="10"
android:fillColor="#00000000"
android:strokeColor="#ffffff"/>
<path
android:pathData="M405.5,314.5m-20.5,0a20.5,20.5 0,1 1,41 0a20.5,20.5 0,1 1,-41 0"
android:fillColor="#000000"/>
<path
android:pathData="M195.5,314.5m-20.5,0a20.5,20.5 0,1 1,41 0a20.5,20.5 0,1 1,-41 0"
android:fillColor="#000000"/>
</group>
</vector>
9 changes: 9 additions & 0 deletions android/core/ui/src/main/res/drawable/ic_logo.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions android/core/ui/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="key">#FFBB2649</color>
<color name="light_gray">#FFF5F5F5</color>

<color name="primary">#FFBB2649</color>
<color name="primary_container">#FFF8E9ED</color>
Expand Down
4 changes: 4 additions & 0 deletions android/core/ui/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
<dimen name="extra_large">32dp</dimen>

<dimen name="music_horizontal_img">120dp</dimen>
<dimen name="login_icon_margin_vertical">168dp</dimen>

<dimen name="btn_height">50dp</dimen>
<dimen name="login_radius">10dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions android/core/ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@
<string name="genre">장르</string>
<string name="description">설명</string>

<string name="google_account_login">구글계정으로 로그인</string>

</resources>
6 changes: 6 additions & 0 deletions android/feature/login/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
android:name=".LoginActivity"
android:exported="true" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.ohdodok.catchytape.feature.login

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import dagger.hilt.android.AndroidEntryPoint


@AndroidEntryPoint
class LoginActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_login)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.ohdodok.catchytape.feature.login

import android.os.Bundle
import android.view.View
import androidx.fragment.app.viewModels
import com.ohdodok.catchytape.core.ui.BaseFragment
import com.ohdodok.catchytape.feature.login.databinding.FragmentLoginBinding
import dagger.hilt.android.AndroidEntryPoint


@AndroidEntryPoint
class LoginFragment : BaseFragment<FragmentLoginBinding>(R.layout.fragment_login) {
private val viewModel: LoginViewModel by viewModels()

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.viewModel = viewModel
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.ohdodok.catchytape.feature.login

import androidx.lifecycle.ViewModel

class LoginViewModel : ViewModel() {

}
25 changes: 25 additions & 0 deletions android/feature/login/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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">

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

<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/login_navigation" />


</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
58 changes: 58 additions & 0 deletions android/feature/login/src/main/res/layout/fragment_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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>

<variable
name="viewModel"
type="com.ohdodok.catchytape.feature.login.LoginViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">


<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/login_icon_margin_vertical"
android:src="@drawable/ic_login_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />


<ImageView
android:id="@+id/iv_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_icon" />


<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_google_login"
style="@style/TitleSmall"
android:layout_width="0dp"
android:layout_height="@dimen/btn_height"
android:layout_marginHorizontal="@dimen/margin_horizontal"
android:layout_marginBottom="@dimen/extra_large"
android:background="@drawable/btn_login"
android:drawableStart="@drawable/ic_google"
android:paddingHorizontal="@dimen/margin_horizontal"
android:text="@string/google_account_login"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>

</layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/login_nav_graph"
app:startDestination="@id/login_fragment">

<fragment
android:id="@+id/login_fragment"
android:name="com.ohdodok.catchytape.feature.login.LoginFragment"
android:label="login"
tools:layout="@layout/fragment_login"/>


<fragment
android:id="@+id/nickname_fragment"
android:name="com.ohdodok.catchytape.feature.login.NicknameFragment"
android:label="nickname"
tools:layout="@layout/fragment_nickname"/>

</navigation>
Loading