신기성

pushing practice done

......@@ -36,7 +36,8 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-messaging:20.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.vip">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
......@@ -8,14 +9,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/NoActionBar">
<activity android:name=".SignInActivity"></activity>
<activity android:name=".PushingTestActivity"></activity>
<activity android:name=".SignInActivity" />
<activity android:name=".SignUpActivity" />
<activity android:name=".MainActivity"/>
<activity android:name=".SplashActivity" android:theme="@style/SplashTheme">
<activity android:name=".MainActivity" />
<activity
android:name=".SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
......
package com.example.vip
import android.content.Intent
import android.nfc.Tag
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import com.google.android.gms.tasks.OnCompleteListener
import com.google.firebase.iid.FirebaseInstanceId
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.activity_pushing_test.*
class PushingTestActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_pushing_test)
intent.extras?.let {
for (key in it.keySet()) {
val value = intent.extras?.get(key)
Log.d(TAG, "Key: $key Value: $value")
}
}
confirmButton.setOnClickListener {
FirebaseInstanceId.getInstance().instanceId
.addOnCompleteListener(OnCompleteListener { task ->
if (!task.isSuccessful) {
Log.w(TAG, "getInstanceId failed", task.exception)
return@OnCompleteListener
}
// Get new Instance ID token
val token = task.result?.token
// Log and toast
val msg = getString(R.string.msg_token_fmt, token)
Log.d(TAG, msg)
Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
})
}
}
companion object {
private const val TAG = "MainActivity"
}
}
package com.example.vip
import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
......@@ -16,6 +17,11 @@ class SignInActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_signin)
testingButton.setOnClickListener {
var intent = Intent(this, PushingTestActivity::class.java)
startActivity(intent)
}
val policyFieldList = ArrayList<PolicyFieldItem>()
policyFieldList.add(
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".PushingTestActivity">
<Button
android:id="@+id/confirmButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="321dp"
android:layout_marginBottom="683dp"
android:text="Confirm!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -43,6 +43,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"></androidx.viewpager.widget.ViewPager>
<Button
android:id="@+id/testingButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="PushingPage" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/policyFieldRecyclerView"
android:layout_width="match_parent"
......@@ -57,7 +63,9 @@
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/fragmentContainer"
/>
>
</FrameLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
......
......@@ -12,9 +12,11 @@
<string name="title09">빈카테고리</string>
<string name="title10">빈카테고리</string>
<string name= "alarm">Home</string>
<string name= "clock">추천정책</string>
<string name= "timer">찜 목록</string>
<string name= "stopwatch">내 정보</string>
<string name="alarm">Home</string>
<string name="clock">추천정책</string>
<string name="timer">찜 목록</string>
<string name="stopwatch">내 정보</string>
<string name="msg_token_fmt" translatable="false">InstanceID Token: %s</string>
</resources>
......