Main: rediseño con header propio, tarjeta de frase, stats y sin fondo
Layout nuevo segun mockup SVG: header (titulo + menu popup de 3 puntos), piladora de fecha, tarjeta de frase con fav/compartir/anime, tarjetas de estadisticas EN ESTE ANIME y TOTAL VISTAS, controles prev/hoy/next y boton CAMBIAR FRASE accent. Sin ActionBar ni imagen de fondo; modo oscuro via values-night. applySystemBarsInsets parametrizado con color de navbar e iconos.
This commit is contained in:
1 parent
9b2a527cdb
commit
08070f203a
3 files changed
+280
-139
No files matched your search
@@ -49,30 +49,32 @@ fun restartActivity(act: AppCompatActivity){
|
||||
* Aplica insets de sistema como padding de [root] dejando el fondo a pantalla completa.
|
||||
* Debe llamarse en onCreate tras setContentView; reemplaza al comportamiento pre-Android 15.
|
||||
* Si la activity tiene ActionBar clásico (theme DarkActionBar) se suma su altura arriba.
|
||||
*
|
||||
* Rediseño 2026-10: [navColor] fija el color de la barra de navegación (por defecto
|
||||
* colorPrimary, para pantallas con ActionBar); [darkNavbar]/[lightStatusIcons] ajustan
|
||||
* el color de los iconos del sistema (la main usa fondos claros y modo oscuro real).
|
||||
*/
|
||||
fun AppCompatActivity.applySystemBarsInsets(root: View) {
|
||||
fun AppCompatActivity.applySystemBarsInsets(root: View, navColor: Int? = null, darkNavbar: Boolean = true, lightStatusIcons: Boolean = true) {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
/* Iconos del sistema: oscuros arriba (fondo claro de la app bajo la status bar),
|
||||
claros abajo (la franja que pintamos es colorPrimary). */
|
||||
/* Iconos del sistema según el fondo que quede bajo cada barra. */
|
||||
WindowInsetsControllerCompat(window, root).apply {
|
||||
isAppearanceLightStatusBars = true
|
||||
isAppearanceLightNavigationBars = false
|
||||
isAppearanceLightStatusBars = lightStatusIcons
|
||||
isAppearanceLightNavigationBars = !darkNavbar
|
||||
}
|
||||
/* Barra de navegación del mismo color que el top bar (colorPrimary):
|
||||
- Android < 15: se fija por window.navigationBarColor.
|
||||
- Android 15+ lo ignora (la barra hereda el fondo de la ventana), pero en la
|
||||
navbar de 3 botones aplica un scrim de contraste ~60% que oscurece el color
|
||||
(colorPrimary #28343a se ve como #10151a): isNavigationBarContrastEnforced
|
||||
(API 29+) lo quita y deja el color exacto también en modo 3 botones. */
|
||||
window.navigationBarColor = colorPrimary(this)
|
||||
/* Barra de navegación: Android < 15 usa window.navigationBarColor; Android 15+
|
||||
la ignora (hereda el fondo de la ventana), pero en la navbar de 3 botones aplica
|
||||
un scrim de contraste ~60% que oscurece el color: isNavigationBarContrastEnforced
|
||||
(API 29+) lo quita. La franja del decor cubre el modo gestos en 15+. */
|
||||
val nav = navColor ?: colorPrimary(this)
|
||||
window.navigationBarColor = nav
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
window.isNavigationBarContrastEnforced = false
|
||||
}
|
||||
/* Android 15+ ignora navigationBarColor y la barra de gestos hereda el fondo de la
|
||||
ventana: pintamos una franja colorPrimary al fondo del decor, bajo la barra.
|
||||
ventana: pintamos una franja del color al fondo del decor, bajo la barra.
|
||||
Su altura se fija con el inset real en el listener de abajo. */
|
||||
val navBackdrop = View(this).apply {
|
||||
setBackgroundColor(colorPrimary(this@applySystemBarsInsets))
|
||||
setBackgroundColor(nav)
|
||||
isClickable = false
|
||||
}
|
||||
(window.decorView as ViewGroup).addView(navBackdrop,
|
||||
|
||||
@@ -4,13 +4,15 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import java.util.Calendar
|
||||
import java.text.DateFormatSymbols
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.PopupMenu
|
||||
import android.widget.Toast
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.content.res.Configuration
|
||||
import java.util.Calendar
|
||||
import java.text.DateFormatSymbols
|
||||
|
||||
/* Permisos runtime (POST_NOTIFICATIONS en Android 13+) */
|
||||
import android.Manifest
|
||||
@@ -67,7 +69,13 @@ class MainActivity : AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
applySystemBarsInsets(binding.root)
|
||||
|
||||
/* Rediseño 2026-10: header propio (título + menú), sin ActionBar. El color
|
||||
de la status bar / navbar acompaña al header (bgCard resuelve tema claro/oscuro). */
|
||||
supportActionBar?.hide()
|
||||
val isDark = (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES
|
||||
applySystemBarsInsets(binding.root, navColor = ContextCompat.getColor(this, R.color.bgCard),
|
||||
darkNavbar = isDark, lightStatusIcons = !isDark)
|
||||
|
||||
/* "Close" app on back button: moveTaskToBack. Migrado a OnBackPressedDispatcher
|
||||
porque onBackPressed override ya no se invoca con el gesto back predictivo. */
|
||||
@@ -123,6 +131,14 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
|
||||
/* Menú del header (rediseño): mismo menú main.xml, en PopupMenu sobre el botón */
|
||||
binding.btnMenu.setOnClickListener { anchor ->
|
||||
val popup = PopupMenu(this, anchor)
|
||||
popup.menuInflater.inflate(R.menu.main, popup.menu)
|
||||
popup.setOnMenuItemClickListener { item -> onMenuItem(item) }
|
||||
popup.show()
|
||||
}
|
||||
|
||||
/* Button listeners */
|
||||
binding.btnFav.setOnClickListener() {
|
||||
db.setFav(IDFraseS)
|
||||
@@ -329,6 +345,16 @@ class MainActivity : AppCompatActivity() {
|
||||
binding.txtAnime.setText(db.getAnimeFromIDF(IDFraseS))
|
||||
//txt_date.setText("Frase de hoy")
|
||||
binding.txtDate.setText("Frase del $dayS de ${getMonth(monthS)}")
|
||||
/* Estadísticas (rediseño): progreso del anime actual y total de los seleccionados */
|
||||
val idAnime = db.getIDAnimeFromIDF(IDFraseS)
|
||||
if (idAnime > 0) {
|
||||
val (seenA, totalA) = db.getAnimeFrasesStats(idAnime)
|
||||
binding.statAnimeValue.text = "$seenA / $totalA ${getString(R.string.stat_frases)}"
|
||||
} else {
|
||||
binding.statAnimeValue.text = "—"
|
||||
}
|
||||
val (seenT, totalT) = db.getSeenStatsSelected()
|
||||
binding.statTotalValue.text = "$seenT / $totalT ${getString(R.string.stat_frases)}"
|
||||
/* Set fav icon */
|
||||
if (db.getFav(IDFraseS)) {
|
||||
binding.btnFav.setBackgroundResource(R.drawable.star_on);
|
||||
@@ -339,17 +365,17 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
menuInflater.inflate(R.menu.main, menu)
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean{
|
||||
/** Maneja las opciones del menú del header (Animes/Diario/Favoritos/...) */
|
||||
private fun onMenuItem(item: MenuItem): Boolean{
|
||||
when (item.getItemId()) {
|
||||
R.id.favs -> {
|
||||
startActivity<FavsActivity>()
|
||||
return true
|
||||
}
|
||||
R.id.diario -> {
|
||||
startActivity<DiaryActivity>()
|
||||
return true
|
||||
}
|
||||
R.id.anime -> {
|
||||
startActivity<AnimesSelActivity>()
|
||||
return true
|
||||
@@ -364,10 +390,10 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
R.id.exit -> {
|
||||
moveTaskToBack(true) /* Returns to "desktop" */
|
||||
return super.onOptionsItemSelected(item)
|
||||
return true
|
||||
}
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,168 +1,281 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
<!-- Rediseño 2026-10 (mockup SVG): header propio con menú + píldora de fecha +
|
||||
tarjeta de frase + estadísticas + controles de navegación. Sin ActionBar
|
||||
(ocultada en código) y sin imagen de fondo. Banner al final, sin solape. -->
|
||||
<LinearLayout 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"
|
||||
android:background="@drawable/principal">
|
||||
|
||||
android:background="@color/bgMain"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- ============ HEADER (título + menú) ============ -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/bgCard"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/menu"
|
||||
app:srcCompat="@drawable/ic_more_vert"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/borderColor" />
|
||||
|
||||
<!-- ============ CONTENIDO ============ -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<!-- Píldora de fecha -->
|
||||
<TextView
|
||||
android:id="@+id/txt_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_pill"
|
||||
android:gravity="center"
|
||||
android:text="Fecha"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- Tarjeta principal: frase + divisor + favorito/compartir/anime -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorPrimaryLight"
|
||||
android:paddingTop="6dp"
|
||||
android:text="Fecha"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="22sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#aaffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Sep_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/black"
|
||||
android:scaleType="fitXY" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/bg_card"
|
||||
android:minHeight="230dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_sentence"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fadeScrollbars="true"
|
||||
android:padding="2dp"
|
||||
android:gravity="center"
|
||||
android:minHeight="140dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:scrollbars="vertical"
|
||||
android:text="Aquí la frase, no?"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="20sp"
|
||||
android:text="Aquí la frase"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="16sp"
|
||||
tools:text="Si la frase es muy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, saldrá una scrollbar." />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Sep_2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/black"
|
||||
android:scaleType="fitXY" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@color/borderColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_fav"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/star_off"
|
||||
android:contentDescription="Favorito"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_share"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Compartir"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@android:drawable/ic_menu_share"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_anime"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:paddingStart="12dp"
|
||||
android:text="Texto Anime"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Estadísticas: EN ESTE ANIME / TOTAL VISTAS -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginLeft="26dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_fav"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/star_on"
|
||||
android:scaleType="centerInside" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="14dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_share"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@null"
|
||||
android:paddingTop="2dp"
|
||||
app:srcCompat="@android:drawable/ic_menu_share" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/stat_this_anime"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_anime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="Texto Anime"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
<TextView
|
||||
android:id="@+id/stat_anime_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="—"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/stat_total"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stat_total_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="—"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Controles: anterior / hoy / siguiente -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_media_previous" />
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:contentDescription="Día anterior"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@drawable/ic_chevron_left" />
|
||||
|
||||
<ImageButton
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_today"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_dialog_dialer" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1.2"
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_calendar"
|
||||
app:tint="@color/textPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/btn_today"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_media_next" />
|
||||
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:contentDescription="Día siguiente"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@drawable/ic_chevron_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
<!-- Botón principal -->
|
||||
<TextView
|
||||
android:id="@+id/btn_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cambiar Frase" />
|
||||
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_accent"
|
||||
android:gravity="center"
|
||||
android:text="@string/btn_change"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Contenedor del banner: el AdView se crea por código (loadBannerAd) con tamaño
|
||||
adaptativo; si fuera un <AdView> del XML sin ads:adSize, el SDK loguea
|
||||
"Required XML attribute adSize was missing" y fija el suyo propio. -->
|
||||
<!-- Banner (AdView por código en loadBannerAd) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/adContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
Reference in new issue
Block a user