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

[경북대 Android 주수민] 4주차 과제 step1 #58

Open
wants to merge 15 commits into
base: cleonno3o
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
b6c9b13
docs: README.md 업데이트(step1)
cleonno3o Jul 16, 2024
fc64658
refactor: 검색 결과 위치로 지도를 이동하기 위해 필요한 정보 저장하도록 변경
cleonno3o Jul 16, 2024
a388c4e
feat: 검색 결과를 터치하면 해당 위치의 지도를 표시하는 기능 구현 및 검색 기록에 저장하는 타입을 String -> L…
cleonno3o Jul 16, 2024
a2b900c
feat: 대상 위치를 지도에 표시할 때 핀을 표시하는 기능 추가
cleonno3o Jul 16, 2024
6280b45
feat: 대상 위치를 지도에 표시할때 이름 표시
cleonno3o Jul 16, 2024
41a7be6
docs: README.md 추가 업데이트
cleonno3o Jul 16, 2024
c9092fc
feat: 표시하는 위치의 정보를 bottomsheet를 통해 표시하는 기능 구현
cleonno3o Jul 17, 2024
99c6a75
feat: 저장된 검색어 선택 시 검색 목록 표시 기능 구현
cleonno3o Jul 17, 2024
68333a4
feat: 앱 실행 시 가장 마지막으로 표시한 위치로 이동하는 기능 구현
cleonno3o Jul 17, 2024
da77814
feat: 맵을 불러오는데 실패했을때 표시되는 화면 구현
cleonno3o Jul 17, 2024
ab39527
chore: 미구현 기능에 대한 주석 추가
cleonno3o Jul 17, 2024
95928ab
refactor: 클린 아키텍쳐를 위해 파일 구조 변경
cleonno3o Jul 17, 2024
b50f54f
refactor: Repository 역할이었던 MapModel를Repository 마다 나누어 구현
cleonno3o Jul 18, 2024
1b4e373
refactor: 검색 결과 위치를 표시할 때 새로운 Activity를 생성하지 않고 기존 Activity를 사용 하도록 변경
cleonno3o Jul 18, 2024
d6a364c
feat: Retrofit을 이용한 통신에서 안저성 강화
cleonno3o Jul 19, 2024
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# android-map-location
## 1단계 기능 구현 목록
- [x] 저장된 검색어 선택 시 검색 결과 표시
- [x] 검색 목록에서 항목 선택 시 해당 항목의 위치 표시
- [x] 핀과 이름을 표시
- [x] BottomSheet를 통해 정보 표시
- [x] 앱 종료 시 마지막 위치로 이동
- [x] 맵을 불러오는데 실패하였을 때 대응 화면 표시
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dependencies {
implementation("com.kakao.maps.open:android:2.9.5")
implementation("androidx.activity:activity:1.8.0")
implementation("androidx.test:core-ktx:1.5.0")
implementation("androidx.activity:activity-ktx:1.9.0")
testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk-android:1.13.11")
testImplementation("io.mockk:mockk-agent:1.13.11")
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
android:theme="@style/Theme.Map"
tools:targetApi="31">
<activity
android:name=".SearchActivity"
android:name=".presentation.SearchActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".MapActivity"
android:name=".presentation.MapActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand Down
9 changes: 7 additions & 2 deletions app/src/main/java/campus/tech/kakao/map/DatabaseListener.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package campus.tech.kakao.map

import campus.tech.kakao.map.domain.model.Location

interface DatabaseListener {
fun deleteHistory(historyName: String)
fun insertHistory(historyName: String)
fun deleteHistory(oldHistory: Location)
fun insertHistory(newHistory: Location)
fun searchHistory(locName: String, isExactMatch: Boolean)
fun showMap(newHistory: Location)
fun insertLastLocation(location: Location)
}
14 changes: 0 additions & 14 deletions app/src/main/java/campus/tech/kakao/map/Location.kt

This file was deleted.

50 changes: 0 additions & 50 deletions app/src/main/java/campus/tech/kakao/map/MapActivity.kt

This file was deleted.

16 changes: 15 additions & 1 deletion app/src/main/java/campus/tech/kakao/map/MapApplication.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
package campus.tech.kakao.map

import android.app.Application
import campus.tech.kakao.map.data.repository.HistoryRepositoryImpl
import campus.tech.kakao.map.data.repository.LastLocationRepositoryImpl
import campus.tech.kakao.map.data.repository.ResultRepositoryImpl
import campus.tech.kakao.map.data.source.MapDbHelper
import campus.tech.kakao.map.data.source.RetrofitServiceClient
import com.kakao.vectormap.KakaoMapSdk

class MapApplication: Application() {
class MapApplication : Application() {
lateinit var dbHelper: MapDbHelper
lateinit var resultRepositoryImpl: ResultRepositoryImpl
lateinit var historyRepositoryImpl: HistoryRepositoryImpl
lateinit var lastLocationRepositoryImpl: LastLocationRepositoryImpl

override fun onCreate() {
super.onCreate()
KakaoMapSdk.init(this, getString(R.string.kakao_api_key))
dbHelper = MapDbHelper(this)
resultRepositoryImpl = ResultRepositoryImpl(RetrofitServiceClient.retrofitService)
historyRepositoryImpl = HistoryRepositoryImpl(dbHelper)
lastLocationRepositoryImpl = LastLocationRepositoryImpl(dbHelper)
}
}
7 changes: 5 additions & 2 deletions app/src/main/java/campus/tech/kakao/map/MapContract.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ package campus.tech.kakao.map
import android.provider.BaseColumns

object MapContract {
object MapEntry : BaseColumns {
const val TABLE_NAME = "map"
object MapEntry {
const val TABLE_NAME_HISTORY = "history"
const val TABLE_NAME_LAST_LOCATION = "last_location"
const val COLUMN_NAME_ID = "id"
const val COLUMN_NAME_NAME = "name"
const val COLUMN_NAME_CATEGORY = "category"
const val COLUMN_NAME_ADDRESS = "address"
const val COLUMN_NAME_X = "x"
const val COLUMN_NAME_Y = "y"
}
}
68 changes: 0 additions & 68 deletions app/src/main/java/campus/tech/kakao/map/MapDbHelper.kt

This file was deleted.

Loading