Skip to content

Commit

Permalink
Show gmpApiKey in MainActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Sep 5, 2024
1 parent a118a40 commit 26df786
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,31 @@

package com.google.secrets_gradle_plugin.sample

import android.os.Bundle
import android.widget.LinearLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.google.secrets_plugin.sample.BuildConfig

/**
* Dummy activity. See build.gradle.kts for sample usage of the plugin.
*/
class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

val textView = TextView(this).apply {
@Suppress("SetTextI18n")
text = "GMP API Key: ${BuildConfig.gmpApiKey}"
}
val linearLayout = LinearLayout(this).apply {
layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT
)
addView(textView)
}
setContentView(linearLayout)
}
}

0 comments on commit 26df786

Please sign in to comment.