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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<androidx.viewpager2.widget.ViewPager2 | |
android:id="@+id/slidingViewPager" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:dither="true" | |
android:shape="oval" | |
android:useLevel="true"> | |
<size | |
android:width="12dp" | |
android:height="12dp" /> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:dither="true" | |
android:shape="oval" | |
android:useLevel="true"> | |
<size | |
android:width="8dp" | |
android:height="8dp" /> |
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
class PojoAdapter : | |
androidx.recyclerview.widget.ListAdapter<Pojo, PojoAdapter.POJOViewHolder>(POJODiffCallback()) { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): POJOViewHolder { | |
return POJOViewHolder.from(parent) | |
} | |
override fun onBindViewHolder(holder: POJOViewHolder, position: Int) { | |
val pojoItem = getItem(position) | |
holder.bind(pojoItem) |
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
viewModel.pojoLiveData.observe(this, Observer { pojoList -> | |
if (pojoList != null) { | |
myAdapter.submitList(pojoList) | |
} | |
}) |
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
import android.annotation.SuppressLint | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.ListAdapter | |
class MyAdapter() : ListAdapter<Pojo, MyAdapter.MyNewsHolder>(PojoDiffCallback()) { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyNewsHolder { | |
return MyNewsHolder() | |
} |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.RecyclerView | |
import androidx.recyclerview.widget.ListAdapter | |
//TODO: Import your model when you first use this template |
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
const functions = require('firebase-functions'); | |
// Firebase admin | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
// The snapshot to the user's tokens. | |
// /* Trigger when a new document is created */ | |
exports.createdMatchNotification = functions.firestore | |
// Add the document path to your collection mine is called matches | |
.document('match/{documentId}') | |
.onCreate((snap, context) => { |