Skip to content

Commit

Permalink
Merge pull request #3 from rodrigocastanho/develop
Browse files Browse the repository at this point in the history
Ajuste total Admob restrições Google.
  • Loading branch information
rodrigocastanho authored Sep 1, 2024
2 parents b2b27e2 + 7afbe97 commit 5f1b366
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,4 @@ class TelaRelatorioCusto : AppCompatActivity(), AdapterView.OnItemSelectedListen
override fun onNothingSelected(parent: AdapterView<*>?) {
TODO("Not yet implemented")
}


}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package br.com.devnattiva.deolhoveiculo


import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.util.Log
Expand All @@ -9,7 +10,9 @@ import android.view.MenuItem
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.window.OnBackInvokedDispatcher
import androidx.activity.OnBackPressedCallback
import androidx.activity.addCallback
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.GravityCompat
Expand Down Expand Up @@ -82,7 +85,7 @@ class TelaStatusManutencao : AppCompatActivity(),
}

viewActivity.appBarManutencao
.contentManutencao.btFtAddManutencao.setOnClickListener {
.contentManutencao.ivAddManutencao.setOnClickListener {
AddManutencaoDialog(callBack = { manutencao, dialog ->
dialog.dismiss()
viewActivity.appBarManutencao.contentManutencao.tvNaoManutencao.isVisible = false
Expand Down Expand Up @@ -114,7 +117,7 @@ class TelaStatusManutencao : AppCompatActivity(),
val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout)
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START)
}
} else finish()
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ class ControleManutencao {
viewConteudo.txInicioManutencao.visibility = View.GONE
viewConteudo.tvNaoManutencao.isVisible = false
viewConteudo.recyclerViewManutencao.visibility = View.INVISIBLE
viewConteudo.btFtAddManutencao.show()
viewConteudo.ivAddManutencao.isVisible = true
}
} else {
viewConteudo.ivEditarVeiculo.isEnabled = false
viewConteudo.ivFiltro.isInvisible = true
viewConteudo.tvNaoManutencao.isVisible = false
viewConteudo.txInicioManutencao.visibility = View.VISIBLE
viewConteudo.recyclerViewManutencao.visibility = View.INVISIBLE
viewConteudo.btFtAddManutencao.hide()
viewConteudo.ivAddManutencao.isVisible = false
}
}

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable-v21/ic_add_manutencao.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.24"
android:viewportHeight="24.24">
<path
android:fillColor="#FF000000"
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z"/>
</vector>
45 changes: 25 additions & 20 deletions app/src/main/res/layout/content_tela_status_manutencao.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,27 @@
app:srcCompat="@drawable/baseline_filter_list_alt_24"
android:background="@drawable/imagem_carro_select"
app:layout_constraintTop_toBottomOf="@+id/buscaVeiculo"
app:layout_constraintEnd_toStartOf="@+id/iv_add_manutencao"
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
tools:visibility="visible"
tools:ignore="ContentDescription" />

<ImageView
android:id="@+id/iv_add_manutencao"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
app:srcCompat="@drawable/ic_add_manutencao"
android:background="@drawable/imagem_carro_select"
app:layout_constraintTop_toBottomOf="@+id/buscaVeiculo"
app:layout_constraintEnd_toEndOf="parent"
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
tools:visibility="visible"
tools:ignore="ContentDescription" />

<androidx.recyclerview.widget.RecyclerView
Expand All @@ -67,7 +85,7 @@
android:layout_marginTop="5dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="80dp"
android:layout_marginBottom="68dp"
android:splitMotionEvents="true"
android:duplicateParentState="false"
android:focusableInTouchMode="true"
Expand All @@ -79,7 +97,7 @@
app:layout_constraintTop_toBottomOf="@+id/iv_filtro"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/fg_anuncio_banner"
app:layout_constraintBottom_toTopOf="@+id/guideline01"
app:layout_constraintHorizontal_bias="0.0" />

<TextView
Expand Down Expand Up @@ -116,36 +134,23 @@
android:visibility="gone"
app:drawableStartCompat="@drawable/ic_menu_manutencao" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/bt_ft_add_manutencao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_add_20"
android:layout_gravity="end|bottom"
app:layout_constraintTop_toBottomOf="@+id/recyclerViewManutencao"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="5dp"
android:layout_marginEnd="16dp"
android:visibility="visible">

</com.google.android.material.floatingactionbutton.FloatingActionButton>

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.909" />
app:layout_constraintGuide_percent="1" />

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fg_anuncio_banner"
android:name="br.com.devnattiva.deolhoveiculo.AdMobFragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/guideline01"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/recyclerViewManutencao"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="10dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
<!- -->

<!-- test-->
<string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>
<string name="banner_app_id">ca-app-pub-3940256099942544/6300978111</string>
<!-- <string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>-->
<!-- <string name="banner_app_id">ca-app-pub-3940256099942544/6300978111</string>-->

<string name="admob_app_id">ca-app-pub-5807404146135121/2182703144</string>
<string name="banner_app_id">ca-app-pub-5807404146135121~8748111490</string>

<string name="sobreApp">Aplicativo com foco em ajudar você a registrar as manutenções e analisar os gastos com as manutenções de seu veículo. </string>
<string name="versao">Versão: 1.4</string>
Expand Down

0 comments on commit 5f1b366

Please sign in to comment.