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

Feature/week6 2 #10

Merged
merged 14 commits into from
Jun 21, 2023
Merged
10 changes: 5 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
xmlns:tools="http://schemas.android.com/tools">

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


<application
android:allowBackup="true"
Expand All @@ -19,10 +22,7 @@
android:exported="true"
android:windowSoftInputMode="adjustPan"></activity>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사소한 거지만 > 대신 />로 닫아도 될 것 같네요 !

<activity
android:name=".myPage.IntroduceActivity"
android:exported="false" />
<activity
android:name=".myPage.LoginActivity"
android:name=".present.loginPage.LoginActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -31,7 +31,7 @@
</intent-filter>
</activity>
<activity
android:name=".myPage.SignUpActivity"
android:name=".present.loginPage.SignUpActivity"
android:exported="false" />
</application>

Expand Down
11 changes: 8 additions & 3 deletions app/src/main/java/org/android/go/sopt/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.fragment.app.Fragment
import org.android.go.sopt.databinding.ActivityMainBinding
import org.android.go.sopt.present.GalleryFragment
import org.android.go.sopt.present.HomeFragment
import org.android.go.sopt.present.SearchFragment
import org.android.go.sopt.present.menuFragment.GalleryFragment
import org.android.go.sopt.present.menuFragment.HomeFragment
import org.android.go.sopt.present.menuFragment.MyProfileFragment
import org.android.go.sopt.present.menuFragment.SearchFragment

class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
Expand Down Expand Up @@ -44,6 +45,10 @@ class MainActivity : AppCompatActivity() {
changeFragment(GalleryFragment())
return@setOnItemSelectedListener true
}
R.id.menu_profile -> {
changeFragment(MyProfileFragment())
return@setOnItemSelectedListener true
}
Comment on lines 45 to +51

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요렇게 로직을 구현할 경우 Fragment 객체를 매번 생성해야 할 것 같아요!
이를 한 번만 생성하여 사용할 수도 있을까요 !?

else -> {
false
}
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/org/android/go/sopt/MultiViewAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.android.go.sopt.data.*
import org.android.go.sopt.databinding.ItemBottomBinding
import org.android.go.sopt.databinding.ItemTopBinding
import org.android.go.sopt.databinding.ItemUsersBinding
import org.android.go.sopt.remote.model.ResponseListUsersDto
import org.android.go.sopt.remote.remoteData.model.ResponseListUsersDto



Expand All @@ -31,8 +31,6 @@ class MultiViewAdapter(context: Context) :

private val inflater by lazy { LayoutInflater.from(context) }
private lateinit var selectionTracker: SelectionTracker<Long>
private val context = context


override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return when (viewType) {
Expand Down Expand Up @@ -114,7 +112,7 @@ class MultiViewAdapter(context: Context) :

binding.tvUserName.text = item.first_name + item.last_name
binding.tvUserEmail.text = item.email
Glide.with(context).load(item.avatar).into(binding.ivAvatar)
Glide.with(binding.root).load(item.avatar).into(binding.ivAvatar)

if (selectionTracker != null && selectionTracker.isSelected(absoluteAdapterPosition.toLong())) {
binding.ivSelect.setImageResource(R.drawable.ic_home)
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/org/android/go/sopt/data/User.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.android.go.sopt.data

import android.os.Parcelable
import kotlinx.parcelize.Parcelize

@Parcelize
data class User(
val id : String,
val pw : String,
val name : String,
val feature : String
):Parcelable
47 changes: 0 additions & 47 deletions app/src/main/java/org/android/go/sopt/myPage/IntroduceActivity.kt

This file was deleted.

141 changes: 0 additions & 141 deletions app/src/main/java/org/android/go/sopt/myPage/LoginActivity.kt

This file was deleted.

Loading