add: Pokemon info details

This commit is contained in:
Marcos Paulo Farias
2019-12-28 20:12:45 -04:00
parent d425393d06
commit c1a2de7103
24 changed files with 846 additions and 62 deletions

View File

@ -30,21 +30,29 @@ Also available in Play Store
<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" width="200" alt="Play Store">
</a>
## App preview
## Screenshots
![Home](screenshots/home.png "Home")
![Pokedex](screenshots/pokedex.png "Pokedex")
![Pokedex FAB](screenshots/pokedex-fab.png "Pokedex FAB")
![Pokedex Search](screenshots/pokedex-fab-search.png "Pokedex Search")
![Pokedex Generation](screenshots/pokedex-fab-generation.png "Pokedex Generation")
![Pokemon Info - About](screenshots/pokemon-info-about.png "Pokemon Info - About")
![Pokemon Info - Base Stats](screenshots/pokemon-info-base-stats.png "Pokemon Info - Base Stats")
![Pokemon Info - Evolution](screenshots/pokemon-info-evolution.png "Pokemon Info - Evolution")
![News Detail](screenshots/news-detail.png "News Detail")
<p align="center">
<img src="screenshots/home.png" width="270" alt="Home">
<img src="screenshots/pokedex.png" width="270" alt="Pokedex">
<img src="screenshots/pokedex-fab.png" width="270" alt="Pokedex FAB">
</p>
<p align="center">
<img src="screenshots/pokedex-fab-search.png" width="270" alt="Pokedex Search">
<img src="screenshots/pokedex-fab-generation.png" width="270" alt="Pokedex Generation">
<img src="screenshots/pokemon-info-about.png" width="270" alt="Pokemon Info - About">
</p>
<p align="center">
<img src="screenshots/pokemon-info-base-stats.png" width="270" alt="Pokemon Info - Base Stats">
<img src="screenshots/pokemon-info-evolution.png" width="270" alt="Pokemon Info - Evolution">
<img src="screenshots/news-detail.png" width="270" alt="News Detail">
</p>
## Features
- :white_check_mark: Kotlin
- :white_check_mark: Kotlin
- :white_check_mark: Live data
- :white_check_mark: Navigation
- :white_check_mark: MVVM Design Partner
@ -61,8 +69,8 @@ Also available in Play Store
- [x] Pokedex - Search
- [x] Pokedex - Generation
- [x] Pokemon Info
- [ ] Pokemon Info - About
- [ ] Pokemon Info - Base Stats
- [x] Pokemon Info - About
- [x] Pokemon Info - Base Stats
- [ ] Pokemon Info - Evolution
- [x] News Detail
@ -74,3 +82,27 @@ Also available in Play Store
## License
All the code available under the MIT license. See [LICENSE](LICENSE).
```
MIT License
Copyright (c) 2019 Marcos Paulo Farias
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

View File

@ -0,0 +1,29 @@
package dev.marcosfarias.pokedex.adapter
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
class ViewPagerAdapter(supportFragmentManager: FragmentManager) :
FragmentStatePagerAdapter(supportFragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
private val mFragmentList = ArrayList<Fragment>()
private val mFragmentTitleList = ArrayList<String>()
override fun getItem(position: Int): Fragment {
return mFragmentList.get(position)
}
override fun getCount(): Int {
return mFragmentList.size
}
override fun getPageTitle(position: Int): CharSequence? {
return mFragmentTitleList[position]
}
fun addFragment(fragment: Fragment, title : String) {
mFragmentList.add(fragment)
mFragmentTitleList.add(title)
}
}

View File

@ -11,15 +11,13 @@ import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import com.bumptech.glide.Glide
import dev.marcosfarias.pokedex.R
import dev.marcosfarias.pokedex.adapter.ViewPagerAdapter
import dev.marcosfarias.pokedex.ui.dashboard.about.AboutFragment
import dev.marcosfarias.pokedex.ui.dashboard.evolution.EvolutionFragment
import dev.marcosfarias.pokedex.ui.dashboard.moves.MovesFragment
import dev.marcosfarias.pokedex.ui.dashboard.stats.StatsFragment
import dev.marcosfarias.pokedex.utils.PokemonColorUtil
import kotlinx.android.synthetic.main.fragment_dashboard.view.*
import kotlinx.android.synthetic.main.fragment_dashboard.view.imageView
import kotlinx.android.synthetic.main.fragment_dashboard.view.textViewID
import kotlinx.android.synthetic.main.fragment_dashboard.view.textViewName
import kotlinx.android.synthetic.main.fragment_dashboard.view.textViewType1
import kotlinx.android.synthetic.main.fragment_dashboard.view.textViewType2
import kotlinx.android.synthetic.main.fragment_dashboard.view.textViewType3
import kotlinx.android.synthetic.main.item_pokemon.view.*
class DashboardFragment : Fragment() {
@ -68,6 +66,19 @@ class DashboardFragment : Fragment() {
.placeholder(android.R.color.transparent)
.into(root.imageView)
val pager = root.viewPager
val tabs = root.tabs
val adapter = ViewPagerAdapter(fragmentManager!!)
adapter.addFragment(AboutFragment.newInstance(pokemon?.id), getString(R.string.dashboard_tab_1))
adapter.addFragment(StatsFragment.newInstance(pokemon?.id), getString(R.string.dashboard_tab_2))
adapter.addFragment(EvolutionFragment(), getString(R.string.dashboard_tab_3))
adapter.addFragment(MovesFragment(), getString(R.string.dashboard_tab_4))
pager.adapter = adapter
tabs.setupWithViewPager(pager)
}
@ -82,5 +93,4 @@ class DashboardFragment : Fragment() {
}

View File

@ -0,0 +1,56 @@
package dev.marcosfarias.pokedex.ui.dashboard.about
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import dev.marcosfarias.pokedex.R
import dev.marcosfarias.pokedex.ui.dashboard.DashboardViewModel
import kotlinx.android.synthetic.main.fragment_about.view.*
class AboutFragment : Fragment() {
companion object {
@JvmStatic
fun newInstance(id: String?) = AboutFragment().apply {
arguments = Bundle().apply {
putString("id", id)
}
}
}
private lateinit var dashboardViewModel: DashboardViewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
dashboardViewModel = ViewModelProviders.of(this).get(DashboardViewModel::class.java)
val root = inflater.inflate(R.layout.fragment_about, container, false)
arguments?.getString("id").let {
dashboardViewModel.getPokemonById(it).observe(this, Observer { list ->
list?.get(0).let { pokemon ->
root.textViewDescription.text = pokemon?.xdescription
root.textViewHeight.text = pokemon?.height
root.textViewWeight.text = pokemon?.weight
root.textViewEggCycle.text = pokemon?.cycles
root.textViewEggGroups.text = pokemon?.egg_groups
root.textViewBaseEXP.text = pokemon?.base_exp
}
})
}
return root
}
}

View File

@ -0,0 +1,27 @@
package dev.marcosfarias.pokedex.ui.dashboard.evolution
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProviders
import dev.marcosfarias.pokedex.R
import dev.marcosfarias.pokedex.ui.dashboard.DashboardViewModel
class EvolutionFragment : Fragment() {
private lateinit var dashboardViewModel: DashboardViewModel
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ) : View? {
dashboardViewModel = ViewModelProviders.of(this).get(DashboardViewModel::class.java)
val root = inflater.inflate(R.layout.fragment_evolution, container, false)
return root
}
}

View File

@ -0,0 +1,17 @@
package dev.marcosfarias.pokedex.ui.dashboard.moves
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import dev.marcosfarias.pokedex.R
class MovesFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ) : View? {
val root = inflater.inflate(R.layout.fragment_moves, container, false)
return root
}
}

View File

@ -0,0 +1,63 @@
package dev.marcosfarias.pokedex.ui.dashboard.stats
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import dev.marcosfarias.pokedex.R
import dev.marcosfarias.pokedex.ui.dashboard.DashboardViewModel
import kotlinx.android.synthetic.main.fragment_stats.view.*
class StatsFragment : Fragment() {
companion object {
@JvmStatic
fun newInstance(id: String?) = StatsFragment().apply {
arguments = Bundle().apply {
putString("id", id)
}
}
}
private lateinit var dashboardViewModel: DashboardViewModel
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ) : View? {
dashboardViewModel = ViewModelProviders.of(this).get(DashboardViewModel::class.java)
val root = inflater.inflate(R.layout.fragment_stats, container, false)
arguments?.getString("id").let {
dashboardViewModel.getPokemonById(it).observe(this, Observer { list ->
list?.get(0).let { pokemon ->
root.textViewTypeDefenses.text = pokemon?.ydescription
root.textViewHP.text = pokemon?.hp.toString()
root.textViewAttack.text = pokemon?.attack.toString()
root.textViewDefense.text = pokemon?.defense.toString()
root.textViewSpAtk.text = pokemon?.special_attack.toString()
root.textViewSpDef.text = pokemon?.special_defense.toString()
root.textViewSpeed.text = pokemon?.speed.toString()
root.textViewTotal.text = pokemon?.total.toString()
root.progressBarHP.progress = pokemon?.hp ?: 0
root.progressBarAttack.progress = pokemon?.attack ?: 0
root.progressBarDefense.progress = pokemon?.defense ?: 0
root.progressBarSpAtk.progress = pokemon?.special_attack ?: 0
root.progressBarSpDef.progress = pokemon?.special_defense ?: 0
root.progressBarSpeed.progress = pokemon?.speed ?: 0
root.progressBarTotal.progress = pokemon?.total ?: 0
}
})
}
return root
}
}

View File

@ -0,0 +1,224 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="@color/backgroundLight"
android:fillViewport="true"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textViewDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/lorem_small"
android:textSize="16sp" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Height"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewHeight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="2,3.5 (0.70 cm)" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Weight"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewWeight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="15.2 lbs (6.9kg)"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Breeding"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Gender"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewGender"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="\u2641 87.5% \u2640 12.5%"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Egg Groups"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewEggGroups"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="\u2641 87.5% \u2640 12.5%" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Egg Cycle"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewEggCycle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="\u2640 87.5% \u2642 12.5%" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Location"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:adjustViewBounds="true"
android:src="@drawable/map" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Training"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="32dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Base EXP"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewBaseEXP"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="65" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -30,8 +30,7 @@
android:id="@+id/imageView"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_gravity="center"
android:src="@drawable/poke001" />
android:layout_gravity="center" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@ -59,11 +58,11 @@
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:fontFamily="@font/circularstd_medium"
android:text="Titulo"
android:textColor="@color/white"
android:textSize="28sp"
android:textStyle="bold"
app:fontFamily="@font/circularstd_medium" />
app:fontFamily="@font/circularstd_medium"
tools:text="Titulo" />
<TextView
android:id="@+id/textViewID"
@ -73,7 +72,6 @@
android:layout_alignParentEnd="true"
android:alpha="0.5"
android:gravity="top"
android:text="#001"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
@ -90,9 +88,9 @@
android:background="@drawable/background_item_pokemon_span"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="Grass"
android:textColor="@color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:text="Grass" />
<TextView
android:id="@+id/textViewType2"
@ -104,9 +102,9 @@
android:background="@drawable/background_item_pokemon_span"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="Grass"
android:textColor="@color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:text="Grass" />
<TextView
android:id="@+id/textViewType3"
@ -117,9 +115,9 @@
android:background="@drawable/background_item_pokemon_span"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="Grass"
android:textColor="@color/white"
android:textSize="14sp" />
android:textSize="14sp"
tools:text="Grass" />
</RelativeLayout>
@ -174,19 +172,14 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lorem_large" />
</LinearLayout>
android:background="@color/backgroundLight" />
</androidx.core.widget.NestedScrollView>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:text="@string/in_progress"
android:textAlignment="center"
android:textSize="20sp" />
</LinearLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:text="@string/in_progress"
android:textAlignment="center"
android:textSize="20sp" />
</LinearLayout>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/text_notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="@color/backgroundLight"
android:fillViewport="true"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="HP"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewHP"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarHP"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Attack"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewAttack"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarAttack"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Defense"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewDefense"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarDefense"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Sp. Atk"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewSpAtk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarSpAtk"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Sp. Def"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewSpDef"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarSpDef"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Speed"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewSpeed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarSpeed"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="100"
android:progress="43" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Total"
android:textSize="16sp" />
<TextView
android:id="@+id/textViewTotal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="55" />
<ProgressBar
android:id="@+id/progressBarTotal"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="4"
android:indeterminate="false"
android:max="600"
android:progress="43" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Type defenses"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="32dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textViewTypeDefenses"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textSize="16sp"
tools:text="65" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -50,12 +50,35 @@
android:label="@string/app_name"
tools:layout="@layout/fragment_search" />
<fragment
android:id="@+id/navigation_dashboard"
android:name="dev.marcosfarias.pokedex.ui.dashboard.DashboardFragment"
android:label="@string/app_name"
tools:layout="@layout/fragment_dashboard" />
<fragment
android:id="@+id/navigation_about"
android:name="dev.marcosfarias.pokedex.ui.dashboard.about.AboutFragment"
android:label="@string/app_name"
tools:layout="@layout/fragment_about" />
<fragment
android:id="@+id/navigation_moves"
android:name="dev.marcosfarias.pokedex.ui.dashboard.moves.MovesFragment"
android:label="@string/app_name"
tools:layout="@layout/fragment_moves" />
<fragment
android:id="@+id/navigation_evolution"
android:name="dev.marcosfarias.pokedex.ui.dashboard.evolution.EvolutionFragment"
android:label="@string/app_name"
tools:layout="@layout/fragment_evolution" />
<fragment
android:id="@+id/navigation_stats"
android:name="dev.marcosfarias.pokedex.ui.dashboard.stats.StatsFragment"
android:label="@string/app_name"
tools:layout="@layout/fragment_stats" />
</navigation>

View File

@ -10,6 +10,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="bottomSheetDialogTheme">@style/AppBottomSheetDialogTheme</item>
<item name="android:textViewStyle" >@style/RobotoTextViewStyle </item>
</style>
<style name="AppTheme.Title.Collapsed" parent="android:TextAppearance">
@ -28,6 +29,10 @@
<item name="android:background">@android:color/transparent</item>
</style>
<style name= "RobotoTextViewStyle" parent= "android:Widget.TextView" >
<item name= "android:fontFamily" > @font/circularstd_book </item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 703 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 179 KiB