Skip to content

Commit

Permalink
#6 remain_ui/남은 ui : 지도 검색 결과
Browse files Browse the repository at this point in the history
 - 검색 결과 타입 : 텍스트 > 아이콘 이미지
  • Loading branch information
likppi10 committed Sep 12, 2022
1 parent 0fc84d3 commit e961ec8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,16 @@ package com.ftw.hometerview.ui.searchaddressbuilding

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Parcelable
import android.util.Log
import android.view.inputmethod.EditorInfo
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import com.ftw.hometerview.adapter.DataBindingRecyclerAdapter
import com.ftw.hometerview.adapter.DividerItemDecoration
import com.ftw.hometerview.databinding.ActivitySearchAddressBuildingBinding
import com.ftw.hometerview.ui.searchcompanyresult.SearchCompanyResultActivity
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import kotlinx.parcelize.Parcelize
import javax.inject.Inject

@AndroidEntryPoint
Expand Down Expand Up @@ -49,6 +44,7 @@ class SearchAddressBuildingActivity : AppCompatActivity() {

private fun initList() {
binding.searchResultRecyclerView.adapter = adapter
binding.searchResultRecyclerView.addItemDecoration(DividerItemDecoration(this))
}

private fun observe() {
Expand All @@ -59,7 +55,5 @@ class SearchAddressBuildingActivity : AppCompatActivity() {
}
}
}

}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.ftw.hometerview.ui.searchaddressbuilding

import android.util.Log
import com.ftw.domain.usecase.searchaddressbuilding.GetSearchAddressBuildingUseCase
import com.ftw.hometerview.BR
import com.ftw.hometerview.R
Expand Down
Binary file added app/src/main/res/drawable-xhdpi/icon_building.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/icon_location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/icon_station.png
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
Expand Up @@ -20,46 +20,47 @@
android:paddingBottom="@dimen/dp_size_10"
>

<ImageView
android:id="@+id/result_type_textview"
android:layout_width="@dimen/dp_size_24"
android:layout_height="@dimen/dp_size_24"
android:src="@{searchResult.type.equals(@string/building_text) ? @drawable/icon_building : searchResult.type.equals(@string/location_text) ? @drawable/icon_location : @drawable/icon_station}"
android:layout_marginStart="@dimen/dp_size_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>

<TextView
android:id="@+id/company_textview"
android:layout_width="match_parent"
android:id="@+id/result_name_textview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_size_16"
android:layout_marginTop="@dimen/dp_size_16"
android:layout_marginEnd="@dimen/dp_size_16"
android:layout_marginTop="@dimen/dp_size_4"
android:fontFamily="@font/pretendard_semibold"
android:text="@{searchResult.result}"
android:textColor="@color/black"
android:textSize="@dimen/sp_size_16"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/dp_size_16"
app:layout_constraintStart_toEndOf="@+id/result_type_textview"
app:layout_constraintTop_toTopOf="parent"
tools:text="삼성전자"
/>

<TextView
android:id="@+id/address_textview"
android:id="@+id/result_address_textview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{searchResult.address}"
android:visibility="@{searchResult.type.toString().equals(@string/building_text) ? View.VISIBLE : View.GONE}"
android:layout_marginBottom="@dimen/dp_size_4"
android:fontFamily="@font/pretendard_medium"
android:text="@{searchResult.address}"
android:textColor="@color/blue_300"
android:textSize="@dimen/sp_size_13"
app:layout_constraintEnd_toEndOf="@id/company_textview"
app:layout_constraintStart_toStartOf="@id/company_textview"
app:layout_constraintTop_toBottomOf="@id/company_textview"
tools:text="서울시 마포구 흥정로 32, 34"
/>

<TextView
android:id="@+id/type_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@{searchResult.type}"
android:layout_marginStart="@dimen/dp_size_16"
android:visibility="@{searchResult.type.toString().equals(@string/building_text) ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@+id/result_type_textview"
app:layout_constraintTop_toBottomOf="@id/result_name_textview"
tools:text="서울시 마포구 흥정로 32, 34"
/>

</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down

0 comments on commit e961ec8

Please sign in to comment.