Skip to content

Commit

Permalink
[MERGE] #5 -> develop
Browse files Browse the repository at this point in the history
[UI/#5] login / 로그인뷰 UI 구현
  • Loading branch information
Marchbreeze authored May 6, 2024
2 parents 1a658c1 + 9f4883d commit 37c3fae
Show file tree
Hide file tree
Showing 33 changed files with 296 additions and 26 deletions.
44 changes: 23 additions & 21 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/splash_delete"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_genti_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_genti_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Genti"
android:usesCleartextTraffic="true"
tools:targetApi="31">

<!-- <activity-->
<!-- android:name="com.going.presentation.onboarding.splash.SplashActivity"-->
<!-- android:exported="true"-->
<!-- android:screenOrientation="portrait">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<activity
android:name="kr.genti.presentation.auth.LoginActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
</application>

</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package kr.genti.presentation.auth

import android.os.Bundle
import androidx.activity.viewModels
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import dagger.hilt.android.AndroidEntryPoint
import kr.genti.core.base.BaseActivity
import kr.genti.core.extension.colorOf
import kr.genti.core.extension.setOnSingleClickListener
import kr.genti.presentation.R
import kr.genti.presentation.databinding.ActivityLoginBinding

@AndroidEntryPoint
class LoginActivity : BaseActivity<ActivityLoginBinding>(R.layout.activity_login) {
private val viewModel by viewModels<LoginViewModel>()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

initLoginBtnListener()
setStatusBarTransparent()
setNavigationBarGreen()
}

private fun initLoginBtnListener() {
binding.btnLoginKakao.setOnSingleClickListener {
}
}

private fun setStatusBarTransparent() {
WindowCompat.setDecorFitsSystemWindows(window, false)
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
v.updatePadding(bottom = insets.getInsets(WindowInsetsCompat.Type.navigationBars()).bottom)
insets
}
}

private fun setNavigationBarGreen() {
this.window.navigationBarColor = colorOf(R.color.genti_green)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package kr.genti.presentation.auth

import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class LoginViewModel
@Inject
constructor(
// private val authRepository: AuthRepository,
) : ViewModel()
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
11 changes: 11 additions & 0 deletions presentation/src/main/res/drawable/ic_kakao.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="33.75dp"
android:viewportWidth="36"
android:viewportHeight="33.75">
<path
android:fillColor="#FF000000"
android:pathData="M18,0.001c-9.942,0 -18,6.256 -18,13.973 0,4.8 3.117,9.03 7.863,11.546l-2,7.33a0.736,0.736 0,0 0,1.127 0.789l8.754,-5.8c0.738,0.071 1.489,0.113 2.253,0.113 9.941,0 18,-6.257 18,-13.973s-8.059,-13.973 -18,-13.973"
android:fillType="evenOdd"
android:fillAlpha="0.9"/>
</vector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/kakao_yellow" />
<corners android:radius="8dp" />
</shape>
106 changes: 106 additions & 0 deletions presentation/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?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">

<data>

</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">

<ImageView
android:id="@+id/iv_login_bg_top"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/login_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/iv_login_bg_bottom"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/login_bottom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<ImageView
android:id="@+id/iv_login_logo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="52dp"
android:layout_marginTop="70dp"
android:adjustViewBounds="true"
android:src="@drawable/logo_genti_3d"
app:layout_constraintBottom_toTopOf="@id/tv_login_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />

<TextView
android:id="@+id/tv_login_title"
style="@style/TextAppearance.Genti.Headline1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="29dp"
android:gravity="center"
android:text="@string/login_tv_title"
android:textColor="@color/grey_1"
app:layout_constraintBottom_toTopOf="@id/btn_login_kakao"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_login_logo"
app:layout_constraintVertical_chainStyle="packed" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/btn_login_kakao"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="60dp"
android:layout_marginTop="70dp"
android:background="@drawable/shape_kakao_fill_8_rect"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_login_title"
app:layout_constraintVertical_chainStyle="packed">

<ImageView
android:id="@+id/iv_login_kakao"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="20dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="2dp"
android:src="@drawable/ic_kakao"
app:layout_constraintBottom_toBottomOf="@id/tv_login_btn"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_login_btn" />

<TextView
android:id="@+id/tv_login_btn"
style="@style/TextAppearance.Genti.Kakao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="11dp"
android:layout_marginStart="20dp"
android:text="@string/login_btn_kakao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_genti_launcher_background"/>
<foreground android:drawable="@mipmap/ic_genti_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_genti_launcher_background"/>
<foreground android:drawable="@mipmap/ic_genti_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions presentation/src/main/res/values/appearances.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@
<item name="android:paddingVertical">2sp</item>
</style>

<style name="TextAppearance.Genti.Kakao">
<item name="fontFamily">@font/font_pretendard_regular</item>
<item name="android:textSize">19sp</item>
</style>

</resources>
2 changes: 2 additions & 0 deletions presentation/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<color name="grey_3">#B6B6B6</color>
<color name="grey_4">#CFCFCF</color>
<color name="grey_5">#F3F3F3</color>
<color name="white">#FFFFFF</color>
<color name="background_white">#F9F9F9</color>

<!-- Green -->
Expand All @@ -26,6 +27,7 @@

<!-- Etc. -->
<color name="error">#FE0D0D</color>
<color name="kakao_yellow">#FFFEE500</color>

<!-- Transparent -->
<color name="transparent">#00000000</color>
Expand Down
4 changes: 3 additions & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<resources>
<string name="app_name">presentation</string>
<string name="app_name">Genti</string>
<string name="login_btn_kakao">카카오로 계속하기</string>
<string name="login_tv_title">내 마음대로 표현하는\n하나뿐인 AI 사진</string>
</resources>
4 changes: 0 additions & 4 deletions presentation/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@

<style name="Theme.Genti" parent="Base.Theme.Genti" />

<style name="splash_delete" parent="Base.Theme.Genti">
<item name="android:windowIsTranslucent">true</item>
</style>

</resources>

0 comments on commit 37c3fae

Please sign in to comment.