-
Notifications
You must be signed in to change notification settings - Fork 2
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
[feat] 검색 뷰 구현 #188
[feat] 검색 뷰 구현 #188
Changes from 9 commits
8be6dfa
074dc4f
beb9925
2952130
55f536f
62927e8
1f21c5b
9084256
af8b0e6
b682590
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.sopt.pingle.presentation.ui.search | ||
|
||
import android.os.Bundle | ||
import org.sopt.pingle.R | ||
import org.sopt.pingle.databinding.ActivitySearchBinding | ||
import org.sopt.pingle.util.base.BindingActivity | ||
import org.sopt.pingle.util.context.hideKeyboard | ||
|
||
class SearchActivity : BindingActivity<ActivitySearchBinding>(R.layout.activity_search) { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
initLayout() | ||
addListeners() | ||
} | ||
|
||
private fun initLayout() { | ||
binding.pingleSearchSearch.editText.requestFocus() | ||
} | ||
|
||
private fun addListeners() { | ||
binding.root.setOnClickListener { | ||
hideKeyboard(binding.pingleSearchSearch.editText) | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import org.sopt.pingle.presentation.ui.common.WebViewActivity.Companion.WEB_VIEW | |
fun Context.hideKeyboard(view: View) { | ||
val inputMethodManager = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager | ||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0) | ||
view.clearFocus() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헐 이런게 있따니 나 안그래도 오늘 ㅜ 타프젝 작업하면서 포커스가 넘 거슬렸는데ㅠㅠ 바로 적용해야딩 우헤헤 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 음하하 |
||
} | ||
|
||
fun Context.stringOf(@StringRes resId: Int) = getString(resId) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?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=".presentation.ui.search.SearchActivity"> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_start" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_begin="@dimen/spacing16" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_end" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_end="@dimen/spacing16" /> | ||
|
||
<org.sopt.pingle.util.component.PingleSearch | ||
android:id="@+id/pingle_search_search" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="30dp" | ||
app:layout_constraintEnd_toStartOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:pingleSearchHint="@string/search_search_bar_hint" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_search_search_pingle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="145dp" | ||
android:src="@drawable/img_search_pingle_graphic" | ||
app:layout_constraintEnd_toStartOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toBottomOf="@id/pingle_search_search" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_search_search_description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="20dp" | ||
android:text="@string/search_description" | ||
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.16" | ||
android:textColor="@color/g_02" | ||
app:layout_constraintEnd_toStartOf="@id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_start" | ||
app:layout_constraintTop_toBottomOf="@id/iv_search_search_pingle" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 중앙 정렬로 수정 (키보드 올라왔을 때 안 가리도록 수정) |
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,6 +168,17 @@ | |
<string name="setting_withdraw_modal_detail">탈퇴 시 계정은 삭제되며 복구할 수 없어요</string> | ||
<string name="setting_withdraw_modal_btn_text">탈퇴하기</string> | ||
|
||
<!-- my pingle --> | ||
<string name="my_pingle_chat">대화하기</string> | ||
<string name="my_pingle_cancel">참여 취소하기</string> | ||
<string name="my_pingle_delete">핑글 삭제하기</string> | ||
<string name="my_pingle_topbar">마이핑글</string> | ||
<string name="my_pingle_soon">홈으로 이동해\n내 주변 핑글을 찾아보세요!</string> | ||
<string name="my_pingle_done">아직 참여한 핑글이 없어요\n첫 핑글과 함께 네트워킹을 시작해보세요!</string> | ||
<string name="my_pingle_tab_soon">\t\t\t\t\t\t\t예정된\t\t\t\t\t\t\t\t</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 웃기다 \t 작렬 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 이거 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 커스텀 안 하려고 ㅋㅋㅋㅋㅋㅋㅋㅋ 민우핑이 나중에 리팩 해줄 거에요,, (아마도) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 쉿 |
||
<string name="my_pingle_tab_done">\t\t\t\t\t\t참여완료\t\t\t\t\t\t</string> | ||
<string name="my_pingle_participant">%d/%d명</string> | ||
|
||
<!-- on boarding --> | ||
<string name="on_boarding_title">핑글에 오신걸\n환영합니다!</string> | ||
<string name="on_boarding_original_group">이미 등록된\n 단체가 있어요</string> | ||
|
@@ -181,14 +192,7 @@ | |
<string name="participant_topbar">참여현황</string> | ||
<string name="participant_owner">개최자</string> | ||
|
||
<!-- my pingle --> | ||
<string name="my_pingle_chat">대화하기</string> | ||
<string name="my_pingle_cancel">참여 취소하기</string> | ||
<string name="my_pingle_delete">핑글 삭제하기</string> | ||
<string name="my_pingle_topbar">마이핑글</string> | ||
<string name="my_pingle_soon">홈으로 이동해\n내 주변 핑글을 찾아보세요!</string> | ||
<string name="my_pingle_done">아직 참여한 핑글이 없어요\n첫 핑글과 함께 네트워킹을 시작해보세요!</string> | ||
<string name="my_pingle_tab_soon">\t\t\t\t\t\t\t예정된\t\t\t\t\t\t\t\t</string> | ||
<string name="my_pingle_tab_done">\t\t\t\t\t\t참여완료\t\t\t\t\t\t</string> | ||
<string name="my_pingle_participant">%d/%d명</string> | ||
<!-- search --> | ||
<string name="search_search_bar_hint">핑글 이름, 장소 이름 검색</string> | ||
<string name="search_description">원하는 핑글을 검색해보세요!</string> | ||
</resources> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모지 이거 걍 순서 때문에 수정한거죠??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
순서 정렬 + 새 액티비티 생성 때문에 수정하였습니당