shake working with inventory and little popup ⚗️

change_to_navgraph
Lucas Delanier 2 years ago
parent 24011493ad
commit d791327b73

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="2208661a3b057ece" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-03-10T23:31:57.060360300Z" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
@ -23,6 +24,8 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>
</manifest> </manifest>

@ -1,5 +1,6 @@
package com.example.shakecraft package com.example.shakecraft
import android.hardware.SensorManager
import android.os.Bundle import android.os.Bundle
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import android.view.LayoutInflater import android.view.LayoutInflater
@ -17,16 +18,10 @@ private const val ARG_PARAM2 = "param2"
* create an instance of this fragment. * create an instance of this fragment.
*/ */
class BossFragment : Fragment() { class BossFragment : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
} }
override fun onCreateView( override fun onCreateView(
@ -37,23 +32,4 @@ class BossFragment : Fragment() {
return inflater.inflate(R.layout.fragment_boss, container, false) return inflater.inflate(R.layout.fragment_boss, container, false)
} }
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment BossFragment.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
BossFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
} }

@ -1,59 +1,127 @@
package com.example.shakecraft package com.example.shakecraft
import android.annotation.SuppressLint
import android.content.Context
import android.content.Context.SENSOR_SERVICE
import android.content.pm.ActivityInfo
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.os.Bundle import android.os.Bundle
import android.os.Vibrator
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.animation.AlphaAnimation
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import androidx.core.content.ContextCompat.getSystemService
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.data.Stub
import com.example.shakecraft.model.GeneratorLoot
import com.example.shakecraft.model.Player
import com.example.shakecraft.view.adapter.AdapterInventory
import kotlin.math.pow
import kotlin.math.sqrt
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER class CollectFragment(var player: Player) : Fragment() {
private const val ARG_PARAM1 = "param1" var stubdata = Stub().load();
private const val ARG_PARAM2 = "param2" private lateinit var sensorManager: SensorManager
private lateinit var accelerometer: Sensor
/** private lateinit var accelerometerEventListener: SensorEventListener
* A simple [Fragment] subclass. private lateinit var progressBar: ProgressBar
* Use the [CollectFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class CollectFragment : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
} }
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle? savedInstanceState: Bundle?
): View? { ): View? {
// Inflate the layout for this fragment // Récupérez une référence à la ProgressBar dans la vue
return inflater.inflate(R.layout.fragment_collect, container, false) val view = inflater.inflate(R.layout.fragment_collect, container, false)
}
progressBar = view.findViewById(R.id.progressBar)
companion object { sensorManager = requireActivity().getSystemService(Context.SENSOR_SERVICE) as SensorManager
/** accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)
* Use this factory method to create a new instance of
* this fragment using the provided parameters. // Créez un écouteur de capteur d'accéléromètre pour écouter les secousses
* accelerometerEventListener = object : SensorEventListener {
* @param param1 Parameter 1. override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
* @param param2 Parameter 2. // Ne faites rien ici
* @return A new instance of fragment CollectFragment. }
*/
// TODO: Rename and change types and number of parameters @SuppressLint("ServiceCast")
@JvmStatic override fun onSensorChanged(event: SensorEvent?) {
fun newInstance(param1: String, param2: String) = val acceleration = sqrt(
CollectFragment().apply { event!!.values[0].pow(2) + event.values[1].pow(2) + event.values[2].pow(2)
arguments = Bundle().apply { )
putString(ARG_PARAM1, param1) if(progressBar.progress == 100){
putString(ARG_PARAM2, param2) val vibrator = context?.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
vibrator.vibrate(100)
val item = GeneratorLoot.generateLootCollection();
println(item);
val maVue = view.findViewById<View>(R.id.toast)
val image = maVue.findViewById<ImageView>(R.id.imageViewLoot)
val name = maVue.findViewById<TextView>(R.id.nameLoot)
val xp = maVue.findViewById<TextView>(R.id.xpRewarded)
maVue.visibility = View.VISIBLE
val fadeIn = AlphaAnimation(0f, 1f)
fadeIn.duration = 200
maVue.startAnimation(fadeIn)
maVue.postDelayed({
maVue.visibility = View.GONE
image.setImageResource(item.image)
name.text = item.name
}, 3000)
player.addItem(item);
progressBar.progress = 0;
}
if (acceleration > 40) {
// Le téléphone a été secoué, mettre à jour la barre de chargement ici
progressBar.progress += (acceleration/20).toInt() // Incrémente la progression de la barre de 10 unités
}
}
} }
// Enregistrez l'écouteur de capteur d'accéléromètre
sensorManager.registerListener(
accelerometerEventListener,
accelerometer,
SensorManager.SENSOR_DELAY_GAME
)
// Retournez la vue de fragment
return view
} }
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
override fun onDestroy() {
super.onDestroy()
// Désenregistrez l'écouteur de capteur d'accéléromètre lorsque le fragment est détruit
sensorManager.unregisterListener(accelerometerEventListener)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
} }
} }

@ -8,22 +8,13 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.data.Stub import com.example.shakecraft.data.Stub
import com.example.shakecraft.model.Player
import com.example.shakecraft.view.adapter.AdapterInventory import com.example.shakecraft.view.adapter.AdapterInventory
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/** class InventoryFragment(var player: Player) : Fragment( ) {
* A simple [Fragment] subclass.
* Use the [InventoryFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class InventoryFragment : Fragment() {
var stubdata = Stub().load();
override fun onCreateView( override fun onCreateView(
@ -35,7 +26,7 @@ class InventoryFragment : Fragment() {
val recyclerView: RecyclerView = view.findViewById(R.id.recyclerviewInventory) val recyclerView: RecyclerView = view.findViewById(R.id.recyclerviewInventory)
with(recyclerView) { with(recyclerView) {
layoutManager = LinearLayoutManager(view.context) layoutManager = LinearLayoutManager(view.context)
adapter = AdapterInventory(stubdata) adapter = AdapterInventory(player.items)
} }
return view return view
} }

@ -18,6 +18,7 @@ class MainActivity : AppCompatActivity() {
private var progressValue = 20 private var progressValue = 20
private var lastShakePosition = 0f private var lastShakePosition = 0f
var currentPlayer = Stub().currentPlayer;
// Function to hide NavigationBar // Function to hide NavigationBar
@RequiresApi(Build.VERSION_CODES.R) @RequiresApi(Build.VERSION_CODES.R)
@ -52,11 +53,11 @@ class MainActivity : AppCompatActivity() {
true true
} }
R.id.inventory -> { R.id.inventory -> {
loadFragment(InventoryFragment()) loadFragment(InventoryFragment(currentPlayer))
true true
} }
R.id.plus -> { R.id.plus -> {
loadFragment(CollectFragment()) loadFragment(CollectFragment(currentPlayer))
true true
} }
else -> false else -> false

@ -1,17 +1,22 @@
package com.example.shakecraft.data package com.example.shakecraft.data
import com.example.shakecraft.R
import com.example.shakecraft.model.Item import com.example.shakecraft.model.Item
import com.example.shakecraft.model.Player
class Stub { class Stub {
fun load() : List<Item>{ fun load() : List<Item>{
val items : MutableList<Item> = mutableListOf<Item>() val items : MutableList<Item> = mutableListOf<Item>()
items.add(Item(name = "Beech Log", rarity = 0, stack = 1)); items.add(Item(name = "Beech Log", rarity = 0, stack = 1, R.drawable.ic_anvil));
items.add(Item(name = "Bronze Ore", rarity = 0, stack = 1)); items.add(Item(name = "Bronze Ore", rarity = 0, stack = 1, R.drawable.ic_anvil));
items.add(Item(name = "Iron Ore", rarity = 0, stack = 1)); items.add(Item(name = "Iron Ore", rarity = 0, stack = 1, R.drawable.ic_anvil));
items.add(Item(name = "Diamond", rarity = 0, stack = 1)); items.add(Item(name = "Diamond", rarity = 0, stack = 1, R.drawable.ic_anvil));
return items; return items;
} }
var currentPlayer : Player = Player("Winker",0);
} }

@ -0,0 +1,29 @@
package com.example.shakecraft.model
import com.example.shakecraft.R
import kotlin.random.Random
class GeneratorLoot {
companion object {
fun generateLootCollection(): Item {
val possibleLoot: List<Pair<Item, Double>> = listOf(
Pair(Item(name = "Beech Log", rarity = 0, stack = 1, R.drawable.log2), 0.6),
Pair(Item(name = "Bronze Ore", rarity = 0, stack = 1, R.drawable.bronze_ore), 0.25),
Pair(Item(name = "Iron Ore", rarity = 0, stack = 1, R.drawable.iron_ore), 0.10),
Pair(Item(name = "Diamond", rarity = 0, stack = 1, R.drawable.diamond), 0.05),
)
val rand = Random.nextDouble()
var cumulativeProb = 0.0
for (element in possibleLoot) {
cumulativeProb += element.second
if (rand < cumulativeProb) {
return element.first
}
}
// Si aucun élément n'a été choisi, retourner le dernier élément de la liste
return possibleLoot.last().first
}
}
}

@ -1,9 +1,12 @@
package com.example.shakecraft.model package com.example.shakecraft.model
import android.media.Image
data class Item( data class Item(
var name: String, var name: String,
var rarity: Int, var rarity: Int,
var stack: Int, var stack: Int,
var image: Int,
) )

@ -0,0 +1,32 @@
package com.example.shakecraft.model
class Player(val pseudo: String, var xp: Int = 0) {
var level: Int = 1
private set
val items: MutableList<Item> = mutableListOf()
fun addItem(item: Item) {
var findItem = items.find { it.name == item.name }
if(findItem!= null){
findItem.stack += 1;
}
else{items.add(item)}
}
fun removeItem(item: Item) {
items.remove(item)
}
fun increaseXp(amount: Int) {
xp += amount
if (xp >= 100 * level) {
levelUp()
}
}
private fun levelUp() {
level++
println("$pseudo a atteint le niveau $level !")
}
}

@ -3,6 +3,7 @@ package com.example.shakecraft.view.adapter
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.Adapter import androidx.recyclerview.widget.RecyclerView.Adapter
@ -15,13 +16,21 @@ class AdapterInventory(private val inventory: List<Item>) : RecyclerView.Adapter
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) { class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val textView: TextView val textView: TextView
val textViewNumber: TextView
var imageView: ImageView
init { init {
// Define click listener for the ViewHolder's View // Define click listener for the ViewHolder's View
textView = view.findViewById(R.id.item_name) textView = view.findViewById(R.id.item_name)
textViewNumber = view.findViewById(R.id.item_stock)
imageView = view.findViewById(R.id.item_image)
} }
fun bind(item: Item) { fun bind(item: Item) {
textView.text = item.name textView.text = item.name
textViewNumber.text = item.stack.toString()
imageView.setImageResource(item.image)
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/black_800"/>
<corners
android:topLeftRadius="5dp"
android:topRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"/>
<stroke android:width="1dp"
android:color="@color/white" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/black_800"/>
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:bottomRightRadius="10dp"/>
</shape>

@ -59,28 +59,224 @@
app:layout_constraintTop_toBottomOf="@+id/frameLayout" /> app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
<ProgressBar <ProgressBar
android:id="@+id/progressBar2" android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="8dp"
android:layout_marginHorizontal="50dp" android:layout_marginHorizontal="50dp"
android:max="100" android:max="100"
android:progress="20" android:progress="0"
android:progressDrawable="@drawable/custom_collect_progressbar" android:progressDrawable="@drawable/custom_collect_progressbar"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" /> app:layout_constraintTop_toBottomOf="@+id/imageView" />
<ListView <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="50dp" android:layout_marginHorizontal="50dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="100dp" android:layout_marginTop="100dp"
android:dividerHeight="0dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar2" app:layout_constraintTop_toBottomOf="@+id/progressBar">
tools:listitem="@layout/list_item" /> <LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/log2"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log tree"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="60%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/bronze_ore"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bronze Ore"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="25%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/iron_ore"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Iron Ore"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="10%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/diamond"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Diamond"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="5%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:visibility="invisible"
tools:visibility="visible"
android:id="@+id/toast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:paddingVertical="2dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/toast_notification">
<ImageView
android:id="@+id/imageViewLoot"
android:layout_margin="5dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/log2"
android:background="@drawable/item_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageViewLoot"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/nameLoot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log tree"
android:textStyle="bold"
android:textSize="15sp"
android:textColor="@color/white"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/xpRewarded"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="10"
android:text="10"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xp"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
@ -36,7 +37,6 @@
android:id="@+id/item_name" android:id="@+id/item_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Beech Log"
android:textColor="@color/white" android:textColor="@color/white"
android:textStyle="bold" /> android:textStyle="bold" />
@ -50,11 +50,18 @@
android:id="@+id/item_stock" android:id="@+id/item_stock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="1,6K"
android:textColor="@color/grey_300" android:textColor="@color/grey_300"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="@+id/bottomNav"
android:background="@color/grey_delimiter"></View>
</LinearLayout> </LinearLayout>

@ -10,6 +10,7 @@
<color name="blue">#6D8DFC</color> <color name="blue">#6D8DFC</color>
<color name="black_800">#1D1C22</color> <color name="black_800">#1D1C22</color>
<color name="grey_100">#343339</color> <color name="grey_100">#343339</color>
<color name="grey_delimiter">#302F35</color>
<color name="grey">#2D2C32</color> <color name="grey">#2D2C32</color>
<color name="grey_300">#ADACB2</color> <color name="grey_300">#ADACB2</color>
<color name="red">#FF3D3D</color> <color name="red">#FF3D3D</color>

@ -3,6 +3,5 @@
<string name="inventory_title">Inventory</string> <string name="inventory_title">Inventory</string>
<string name="home_title">Home</string> <string name="home_title">Home</string>
<string name="plus_title">Plus</string> <string name="plus_title">Plus</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string> <string name="hello_blank_fragment">Hello blank fragment</string>
</resources> </resources>
Loading…
Cancel
Save