-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from seoulsanta/eumiing
Eumiing
- Loading branch information
Showing
17 changed files
with
215 additions
and
167 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...roid/app/src/main/java/com/yamgang/seoulsantaandroid/model/post/PostKakaoLoginResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.yamgang.seoulsantaandroid.model.post | ||
|
||
data class PostKakaoLoginResponse( | ||
val status: Int, | ||
val message: String, | ||
val data: LoginData | ||
) | ||
|
||
data class LoginData( | ||
val authorization: String, | ||
val refreshtoken: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 23 additions & 12 deletions
35
.../app/src/main/java/com/yamgang/seoulsantaandroid/ui/badge/current/BadgeCurrentFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,50 @@ | ||
package com.yamgang.seoulsantaandroid.ui.badge.current | ||
|
||
import android.os.Bundle | ||
import android.util.Log | ||
import androidx.fragment.app.Fragment | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.GridLayoutManager | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.yamgang.seoulsantaandroid.R | ||
import com.yamgang.seoulsantaandroid.model.get.BadgeData | ||
import com.yamgang.seoulsantaandroid.ui.MainActivity | ||
import com.yamgang.seoulsantaandroid.ui.badge.BadgeFragment | ||
import com.yamgang.seoulsantaandroid.util.User | ||
import kotlinx.android.synthetic.* | ||
import kotlinx.android.synthetic.main.fragment_badge_current.* | ||
import kotlinx.android.synthetic.main.fragment_badge_current.view.* | ||
import org.jetbrains.anko.support.v4.ctx | ||
|
||
class BadgeCurrentFragment : Fragment() { | ||
|
||
var course_name: String = "코스" | ||
var date: String="날짜" | ||
|
||
companion object{ | ||
var instance: BadgeCurrentFragment = BadgeCurrentFragment() | ||
} | ||
lateinit var inflater: LayoutInflater | ||
//BadgeFragment에서 통신해서 넘어온 데이타리스트 사용하기 | ||
val data: BadgeData = BadgeFragment.instance.data | ||
lateinit var badgeCurrentRecyclerViewAdapter: BadgeCurrentRecyclerViewAdapter | ||
var data :BadgeData = BadgeFragment.instance.data | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
this.inflater = inflater | ||
var view: View = inflater.inflate(R.layout.fragment_badge_current, container, false) | ||
setRecyclerView(view) | ||
return view | ||
return inflater.inflate(R.layout.fragment_badge_current, container, false) | ||
} | ||
|
||
override fun onActivityCreated(savedInstanceState: Bundle?) { | ||
super.onActivityCreated(savedInstanceState) | ||
setRecyclerView() | ||
} | ||
|
||
private fun setRecyclerView() { | ||
badgeCurrentRecyclerViewAdapter = BadgeCurrentRecyclerViewAdapter(activity!!, data!!.badge, data!!.total) | ||
rv_frag_badge_current_list.adapter = badgeCurrentRecyclerViewAdapter | ||
rv_frag_badge_current_list.layoutManager = GridLayoutManager(activity,3) | ||
} | ||
|
||
private fun setRecyclerView(view:View) { | ||
badgeCurrentRecyclerViewAdapter = BadgeCurrentRecyclerViewAdapter(activity!!, data.badge,data.total) | ||
view.rv_frag_badge_current_list.adapter = badgeCurrentRecyclerViewAdapter | ||
view.rv_frag_badge_current_list.layoutManager = GridLayoutManager(activity,3) | ||
fun refresh() { | ||
badgeCurrentRecyclerViewAdapter.notifyDataSetChanged() | ||
setRecyclerView() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.