-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/main view #4
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
Open
yoouyoou
wants to merge
3
commits into
master
Choose a base branch
from
feature/main-view
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,39 @@ | ||
| { | ||
| "project_info": { | ||
| "project_number": "479150024482", | ||
| "project_id": "mbtree-7a9b6", | ||
| "storage_bucket": "mbtree-7a9b6.appspot.com" | ||
| }, | ||
| "client": [ | ||
| { | ||
| "client_info": { | ||
| "mobilesdk_app_id": "1:479150024482:android:5913d300515a08e031a77b", | ||
| "android_client_info": { | ||
| "package_name": "com.umc.project.mbtree" | ||
| } | ||
| }, | ||
| "oauth_client": [ | ||
| { | ||
| "client_id": "479150024482-s1ef07pjscklju3cd5uvjci4j917ute9.apps.googleusercontent.com", | ||
| "client_type": 3 | ||
| } | ||
| ], | ||
| "api_key": [ | ||
| { | ||
| "current_key": "AIzaSyC1YTQIMNFcZ9LFJ4tHwPorEjimPIECCKk" | ||
| } | ||
| ], | ||
| "services": { | ||
| "appinvite_service": { | ||
| "other_platform_oauth_client": [ | ||
| { | ||
| "client_id": "479150024482-s1ef07pjscklju3cd5uvjci4j917ute9.apps.googleusercontent.com", | ||
| "client_type": 3 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "configuration_version": "1" | ||
| } |
This file contains hidden or 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 hidden or 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,35 @@ | ||
| package com.umc.project.mbtree | ||
|
|
||
| import android.os.Bundle | ||
| import android.os.PersistableBundle | ||
| import android.view.LayoutInflater | ||
| import androidx.appcompat.app.AppCompatActivity | ||
| import com.google.firebase.analytics.FirebaseAnalytics | ||
| import com.google.firebase.analytics.ktx.analytics | ||
| import com.google.firebase.analytics.ktx.logEvent | ||
| import com.google.firebase.ktx.Firebase | ||
| import com.umc.project.mbtree.databinding.ActivityChatBinding | ||
|
|
||
| class ChatActivity: AppCompatActivity() { | ||
|
|
||
| lateinit var binding: ActivityChatBinding | ||
| private lateinit var firebaseAnalytics: FirebaseAnalytics | ||
|
|
||
| override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { | ||
| super.onCreate(savedInstanceState, persistentState) | ||
| binding = ActivityChatBinding.inflate(layoutInflater) | ||
|
|
||
| binding.ibSend.setOnClickListener{ | ||
|
|
||
| } | ||
| //firebase객체 가져오기 | ||
| firebaseAnalytics = Firebase.analytics | ||
| //이벤트 로깅 | ||
| firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM){ | ||
| param(FirebaseAnalytics.Param.ITEM_ID, 1) | ||
| param(FirebaseAnalytics.Param.ITEM_NAME, "user1") | ||
| param(FirebaseAnalytics.Param.CONTENT_TYPE, "") | ||
| } | ||
|
|
||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/umc/project/mbtree/LetterActivity.kt
This file contains hidden or 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,38 @@ | ||
| package com.umc.project.mbtree | ||
|
|
||
| import android.app.Activity | ||
| import android.content.Intent | ||
| import android.os.Bundle | ||
| import android.os.PersistableBundle | ||
| import android.util.Log | ||
| import android.view.Window | ||
| import androidx.appcompat.app.AppCompatActivity | ||
| import com.umc.project.mbtree.databinding.ActivityLetterBinding | ||
|
|
||
| class LetterActivity: Activity() { | ||
|
|
||
| lateinit var binding: ActivityLetterBinding | ||
|
|
||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| binding = ActivityLetterBinding.inflate(layoutInflater) | ||
| requestWindowFeature(Window.FEATURE_NO_TITLE) | ||
| setContentView(binding.root) | ||
|
|
||
| Log.d("LetterAcitivity", "Letter넘어옴") | ||
| binding.btnOk.setOnClickListener{ | ||
| val intent = Intent(baseContext, MainActivity::class.java) | ||
| intent.putExtra("content", binding.etPost.toString()) | ||
| setResult(Activity.RESULT_OK, intent) | ||
| finish() | ||
| } | ||
|
|
||
| binding.btnCancel.setOnClickListener{ | ||
| val intent = Intent(baseContext, MainActivity::class.java) | ||
| setResult(RESULT_CANCELED, intent) | ||
| finish() | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } |
This file contains hidden or 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,23 @@ | ||
| package com.umc.project.mbtree | ||
|
|
||
| import android.app.Dialog | ||
| import android.content.Context | ||
| import android.view.WindowManager | ||
|
|
||
| class LetterDialog(context: Context) { | ||
| private val dialog = Dialog(context) | ||
|
|
||
| fun showDialog(){ | ||
| dialog.setContentView(R.layout.activity_letter) | ||
| dialog.window!!.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT) | ||
| dialog.setCanceledOnTouchOutside(true) | ||
| dialog.setCancelable(true) | ||
| dialog.show() | ||
| } | ||
|
|
||
| // private lateinit var onClickListener: ButtonClickListener | ||
| // | ||
| // fun setOnClickListener(listener: ButtonClickListener){ | ||
| // onClickListener = listener | ||
| // } | ||
| } |
This file contains hidden or 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
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/umc/project/mbtree/api/NetworkModule.kt
This file contains hidden or 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,15 @@ | ||
| package com.umc.project.mbtree.api | ||
|
|
||
| import retrofit2.Retrofit | ||
| import retrofit2.converter.gson.GsonConverterFactory | ||
|
|
||
| const val BASE_URL = "http://52.79.254.180:3306" | ||
|
|
||
| fun getRetrofit(): Retrofit { | ||
| val retrofit = Retrofit.Builder() | ||
| .baseUrl(BASE_URL) | ||
| .addConverterFactory(GsonConverterFactory.create()) | ||
| .build() | ||
|
|
||
| return retrofit | ||
| } |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/umc/project/mbtree/api/RetrofitInterface.kt
This file contains hidden or 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,14 @@ | ||
| package com.umc.project.mbtree.api | ||
|
|
||
| import com.umc.project.mbtree.dto.Post | ||
| import retrofit2.Call | ||
| import retrofit2.http.* | ||
|
|
||
| interface RetrofitInterface { | ||
| @POST("/posts") | ||
| fun createPost(post: Post) | ||
|
|
||
| @GET("/tree") | ||
| fun getPosts(@Query("useridx")useridx: Int?): Call<List<Post>> | ||
|
|
||
| } |
This file contains hidden or 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,7 @@ | ||
| package com.umc.project.mbtree.dto | ||
|
|
||
| data class Chat( | ||
| val name: String, | ||
| val profileImg: String, | ||
| val msg: String | ||
| ) |
This file contains hidden or 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.umc.project.mbtree.dto | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class Post( | ||
| @SerializedName("id") var id: Int, | ||
| @SerializedName("content") var content: String, | ||
| @SerializedName("xPos") var xPos: Float, | ||
| @SerializedName("yPos") var yPos: Float, | ||
| @SerializedName("writerId") var writerId: User, | ||
| @SerializedName("userId") var userId: User | ||
| ) |
This file contains hidden or 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,10 @@ | ||
| package com.umc.project.mbtree.dto | ||
|
|
||
| data class User( | ||
| var id: Int, | ||
| var email: String, | ||
| var location: String, | ||
| var myers: String, | ||
| var name: String, | ||
| var user_token: String | ||
| ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <item> | ||
| <shape> | ||
| <solid android:color="@color/white"/> | ||
| <corners android:radius="10dp"/> | ||
| <stroke | ||
| android:color="@color/black" | ||
| android:width="1dp"/> | ||
| </shape> | ||
| </item> | ||
| </layer-list> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
dhdhdhdh