Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion admob/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion analytics/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion appindexing/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion auth/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion crashlytics/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion database/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
5 changes: 0 additions & 5 deletions dl-invites/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand All @@ -21,10 +20,6 @@ android {
}
}

androidExtensions {
experimental = true
}

dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package com.google.firebase.dynamicinvites.kotlin.view

import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity

import com.google.firebase.dynamicinvites.R
import com.google.firebase.dynamicinvites.kotlin.presenter.InvitePresenter
import kotlinx.android.synthetic.main.activity_main.buttonShare

class AdvancedActivity : AppCompatActivity(), ShareDialogFragment.Listener {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_advanced)

buttonShare.setOnClickListener {
findViewById<Button>(R.id.buttonShare).setOnClickListener {
ShareDialogFragment.newInstance().show(supportFragmentManager, "dialog")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package com.google.firebase.dynamicinvites.kotlin.view

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.google.firebase.dynamicinvites.R
import com.google.firebase.dynamicinvites.kotlin.util.DynamicLinksUtil
import kotlinx.android.synthetic.main.activity_main.buttonShare

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

buttonShare.setOnClickListener {
findViewById<Button>(R.id.buttonShare).setOnClickListener {
onShareClicked()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
Expand All @@ -16,9 +18,6 @@ import com.google.firebase.dynamicinvites.kotlin.presenter.MessagePresenter
import com.google.firebase.dynamicinvites.kotlin.presenter.MorePresenter
import com.google.firebase.dynamicinvites.kotlin.presenter.SocialPresenter
import com.google.firebase.dynamicinvites.kotlin.util.DynamicLinksUtil
import kotlinx.android.synthetic.main.fragment_item_list_dialog.recycler
import kotlinx.android.synthetic.main.item_share_method.view.itemIcon
import kotlinx.android.synthetic.main.item_share_method.view.itemName

/**
* A fragment that shows a list of items as a modal bottom sheet.
Expand Down Expand Up @@ -55,18 +54,15 @@ class ShareDialogFragment : BottomSheetDialogFragment() {
MorePresenter(true, content)
)

val recycler = view.findViewById<RecyclerView>(R.id.recycler)
recycler.layoutManager = LinearLayoutManager(context)
recycler.adapter = ItemAdapter(presenters)
}

override fun onAttach(context: Context) {
super.onAttach(context)
val parent = parentFragment
listener = if (parent != null) {
parent as Listener
} else {
context as Listener
}
listener = (parent ?: context) as Listener
}

override fun onDetach() {
Expand All @@ -81,9 +77,9 @@ class ShareDialogFragment : BottomSheetDialogFragment() {
private inner class ViewHolder(inflater: LayoutInflater, parent: ViewGroup) :
RecyclerView.ViewHolder(inflater.inflate(R.layout.item_share_method, parent, false)) {

internal fun bind(presenter: InvitePresenter) {
itemView.itemName.text = presenter.name
itemView.itemIcon.setImageResource(presenter.icon)
fun bind(presenter: InvitePresenter) {
itemView.findViewById<TextView>(R.id.itemName).text = presenter.name
itemView.findViewById<ImageView>(R.id.itemIcon).setImageResource(presenter.icon)

itemView.setOnClickListener {
listener?.onItemClicked(presenter)
Expand Down
1 change: 0 additions & 1 deletion dynamic-links/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion firebaseoptions/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion firestore/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion functions/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion inappmessaging/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion installations/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion messaging/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion mlkit/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion perf/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion predictions/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.AdView
import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.example.predictions.R
import com.google.firebase.ktx.Firebase
import com.google.firebase.remoteconfig.ktx.get
import com.google.firebase.remoteconfig.ktx.remoteConfig
import kotlinx.android.synthetic.main.activity_main.adView

class MainActivity : AppCompatActivity() {

Expand Down Expand Up @@ -44,6 +45,7 @@ class MainActivity : AppCompatActivity() {
}

private fun executeAdsPolicy() {
val adView = findViewById<AdView>(R.id.adView)
// [START pred_ads_policy]
val config = Firebase.remoteConfig
val adPolicy = config["ads_policy"].asString()
Expand Down
1 change: 0 additions & 1 deletion storage/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.graphics.drawable.BitmapDrawable
import android.net.Uri
import android.os.Bundle
import android.util.Log
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import com.google.android.gms.tasks.OnFailureListener
import com.google.firebase.ktx.Firebase
Expand All @@ -18,7 +19,6 @@ import com.google.firebase.storage.ktx.component2
import com.google.firebase.storage.ktx.component3
import com.google.firebase.storage.ktx.storage
import com.google.firebase.storage.ktx.storageMetadata
import kotlinx.android.synthetic.main.activity_storage.imageView
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.FileInputStream
Expand Down Expand Up @@ -140,6 +140,7 @@ abstract class StorageActivity : AppCompatActivity() {
mountainsRef.path == mountainImagesRef.path // false
// [END upload_create_reference]

val imageView = findViewById<ImageView>(R.id.imageView)
// [START upload_memory]
// Get the data from an ImageView as bytes
imageView.isDrawingCacheEnabled = true
Expand Down
1 change: 0 additions & 1 deletion tasks/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down
1 change: 0 additions & 1 deletion test-lab/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand Down