Skip to content

Commit 0f530ab

Browse files
committed
feat: search 페이지 UI 구성
1 parent 241c479 commit 0f530ab

13 files changed

Lines changed: 190 additions & 7 deletions

File tree

app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ dependencies {
4747
implementation fileTree(dir: 'libs', include: ['*.jar'])
4848
//noinspection GradleDependency
4949
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
50+
implementation 'com.google.android.material:material:1.3.0-beta01'
5051
implementation 'androidx.appcompat:appcompat:1.2.0'
5152
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
52-
implementation 'com.android.support:design:28.0.0'
5353
implementation "androidx.recyclerview:recyclerview:1.1.0"
5454

55+
// 머티리얼 디자인 라이브러리
56+
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
57+
5558
// test implementation
5659
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
5760
testImplementation 'junit:junit:4.12'

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
android:icon="@drawable/gfd_app_logo"
1010
android:label="@string/app_name"
1111
android:theme="@style/AppLightTheme">
12-
<activity android:name=".views.SearchActivity"></activity>
12+
<activity android:name=".views.SearchActivity"/>
1313
<activity android:name=".views.LauncherActivity">
1414
<intent-filter>
1515
<action android:name="android.intent.action.MAIN" />

app/src/main/java/com/seok/gfd/views/LauncherActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LauncherActivity : AppCompatActivity() {
1717

1818
private fun startLoading(){
1919
Handler().postDelayed({
20-
val intent = Intent(this, MainActivity::class.java)
20+
val intent = Intent(this, SearchActivity::class.java)
2121
startActivity(intent)
2222
finish()
2323
}, 1000)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.seok.gfd.views
2+
3+
import android.os.Bundle
4+
import android.view.WindowManager
5+
import android.view.animation.AnimationUtils
6+
import androidx.appcompat.app.AppCompatActivity
7+
import com.seok.gfd.R
8+
import kotlinx.android.synthetic.main.activity_search.*
9+
10+
class SearchActivity : AppCompatActivity() {
11+
override fun onCreate(savedInstanceState: Bundle?) {
12+
super.onCreate(savedInstanceState)
13+
setContentView(R.layout.activity_search)
14+
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
15+
16+
setAnimation()
17+
}
18+
19+
private fun setAnimation() {
20+
val bottomToTop = AnimationUtils.loadAnimation(this, R.anim.bottom_to_top)
21+
search_txt_info2.startAnimation(bottomToTop)
22+
val topToBottom = AnimationUtils.loadAnimation(this, R.anim.top_to_bottom)
23+
topToBottom.startOffset = 300
24+
search_txt_info1.startAnimation(topToBottom)
25+
val leftToRight = AnimationUtils.loadAnimation(this, R.anim.left_to_right)
26+
leftToRight.startOffset = 800
27+
search_layout_id.startAnimation(leftToRight)
28+
}
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate
4+
android:duration="1000"
5+
android:fillAfter="true"
6+
android:fromYDelta="10%p"
7+
android:toYDelta="0%p" />
8+
<alpha
9+
android:duration="1000"
10+
android:fromAlpha="0.0"
11+
android:interpolator="@android:anim/accelerate_interpolator"
12+
android:toAlpha="1.0" />
13+
</set>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate
4+
android:duration="1000"
5+
android:fillAfter="true"
6+
android:fromXDelta="-10%p"
7+
android:toXDelta="0%p" />
8+
<alpha
9+
android:duration="1000"
10+
android:fromAlpha="0.0"
11+
android:interpolator="@android:anim/accelerate_interpolator"
12+
android:toAlpha="1.0" />
13+
</set>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate
4+
android:duration="1000"
5+
android:fillAfter="true"
6+
android:fromXDelta="10%p"
7+
android:toXDelta="0%p" />
8+
<alpha
9+
android:duration="1000"
10+
android:fromAlpha="0.0"
11+
android:interpolator="@android:anim/accelerate_interpolator"
12+
android:toAlpha="1.0" />
13+
</set>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate
4+
android:duration="1000"
5+
android:fillAfter="true"
6+
android:fromYDelta="-10%p"
7+
android:toYDelta="0%p" />
8+
<alpha
9+
android:duration="1000"
10+
android:fromAlpha="0.0"
11+
android:interpolator="@android:anim/accelerate_interpolator"
12+
android:toAlpha="1.0" />
13+
</set>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="32dp" android:tint="#898989"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12 19,6.41z"/>
5+
</vector>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
tools:context=".views.SearchActivity">
8+
9+
<LinearLayout
10+
android:id="@+id/search_layout_id"
11+
android:layout_width="0dp"
12+
android:layout_height="wrap_content"
13+
android:layout_marginTop="50dp"
14+
android:orientation="vertical"
15+
app:layout_constraintEnd_toEndOf="parent"
16+
app:layout_constraintStart_toStartOf="parent"
17+
app:layout_constraintTop_toBottomOf="@+id/search_txt_info2">
18+
19+
<TextView
20+
android:id="@+id/textView6"
21+
android:layout_width="wrap_content"
22+
android:layout_height="wrap_content"
23+
android:layout_marginStart="20dp"
24+
android:text="잔디 현황을 보고싶은 아이디를 입력해주세요 :)"
25+
android:textColor="@color/primaryGray2" />
26+
27+
<com.rengwuxian.materialedittext.MaterialEditText
28+
android:id="@+id/search_edt_id"
29+
android:layout_width="match_parent"
30+
android:layout_height="match_parent"
31+
android:layout_marginLeft="17dp"
32+
android:layout_marginRight="17dp"
33+
android:hint="아이디를 입력해 주세요."
34+
app:met_primaryColor="@color/blue"
35+
app:met_helperText=""
36+
app:met_singleLineEllipsis="true" />
37+
</LinearLayout>
38+
39+
<TextView
40+
android:id="@+id/search_txt_info1"
41+
android:layout_width="wrap_content"
42+
android:layout_height="wrap_content"
43+
android:layout_marginStart="20dp"
44+
android:layout_marginTop="50dp"
45+
android:text="Daily Commit 잔디 !"
46+
android:textColor="@color/primaryBlack"
47+
android:textSize="22sp"
48+
android:textStyle="bold"
49+
app:layout_constraintStart_toStartOf="parent"
50+
app:layout_constraintTop_toTopOf="parent" />
51+
52+
<TextView
53+
android:id="@+id/search_txt_info2"
54+
android:layout_width="wrap_content"
55+
android:layout_height="wrap_content"
56+
android:layout_marginStart="20dp"
57+
android:text="서비스를 이용해주셔서 감사합니다."
58+
android:textColor="@color/primaryBlack"
59+
android:textSize="22sp"
60+
android:textStyle="bold"
61+
app:layout_constraintStart_toStartOf="parent"
62+
app:layout_constraintTop_toBottomOf="@+id/search_txt_info1" />
63+
64+
<com.google.android.material.button.MaterialButton
65+
style="@style/AppLightTheme.Button"
66+
android:id="@+id/search_btn_ok"
67+
android:layout_width="match_parent"
68+
android:layout_height="55dp"
69+
android:layout_marginStart="15dp"
70+
android:layout_marginLeft="15dp"
71+
android:layout_marginEnd="15dp"
72+
android:layout_marginRight="15dp"
73+
android:layout_marginBottom="10dp"
74+
android:text="@string/txt_confirm"
75+
android:textStyle="bold"
76+
android:textSize="18sp"
77+
app:layout_constraintBottom_toBottomOf="parent"
78+
app:layout_constraintCircleRadius="30dp"
79+
app:layout_constraintEnd_toEndOf="parent"
80+
app:layout_constraintStart_toStartOf="parent"/>
81+
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)