v1.5 : contraste des puces de groupe et bouton globe repositionné
- Puce du groupe actif en bleu plein, texte blanc gras ; les autres puces grisées (alpha 50%) mais toujours sélectionnables - Bouton globe redessiné : double halo lumineux autour de la sphère, dégradé plus profond, texture globe en filigrane derrière le libellé - Fond d'écran ancré sur la moitié basse (opacité 16%) : le randonneur est visible sous le bouton, qui flotte au-dessus de sa tête Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
191c4158c7
commit
7a65aaf9ca
4 changed files with 84 additions and 44 deletions
|
|
@ -23,8 +23,8 @@ android {
|
|||
applicationId = "com.example.maposition"
|
||||
minSdk = 21
|
||||
targetSdk = 36
|
||||
versionCode = 5
|
||||
versionName = "1.4"
|
||||
versionCode = 6
|
||||
versionName = "1.5"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.location.Location
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
|
|
@ -125,11 +128,20 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
groupChips.visibility = View.VISIBLE
|
||||
val active = Prefs.getActiveGroup(this)!!
|
||||
val blue = ContextCompat.getColor(this, R.color.brand_blue)
|
||||
groups.forEach { g ->
|
||||
val checked = g.name == active.name
|
||||
val chip = Chip(this).apply {
|
||||
text = g.name
|
||||
isCheckable = true
|
||||
isChecked = g.name == active.name
|
||||
isChecked = checked
|
||||
if (checked) {
|
||||
chipBackgroundColor = ColorStateList.valueOf(blue)
|
||||
setTextColor(Color.WHITE)
|
||||
typeface = Typeface.DEFAULT_BOLD
|
||||
} else {
|
||||
alpha = 0.5f
|
||||
}
|
||||
setOnClickListener {
|
||||
Prefs.setActiveGroupName(this@MainActivity, g.name)
|
||||
refreshRecipientsCard()
|
||||
|
|
|
|||
|
|
@ -2,18 +2,42 @@
|
|||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#40FFFFFF">
|
||||
<item>
|
||||
<layer-list>
|
||||
<!-- Halo extérieur -->
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#1C4A9DFF" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="9dp"
|
||||
android:left="9dp"
|
||||
android:right="9dp"
|
||||
android:top="9dp">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#304A9DFF" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- Sphère -->
|
||||
<item
|
||||
android:bottom="18dp"
|
||||
android:left="18dp"
|
||||
android:right="18dp"
|
||||
android:top="18dp">
|
||||
<shape android:shape="oval">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0.35"
|
||||
android:centerY="0.28"
|
||||
android:gradientRadius="200dp"
|
||||
android:startColor="#4A9DFF"
|
||||
android:centerX="0.33"
|
||||
android:centerY="0.25"
|
||||
android:gradientRadius="190dp"
|
||||
android:startColor="#5FB0FF"
|
||||
android:centerColor="#1E63C8"
|
||||
android:endColor="#0A2F73" />
|
||||
android:endColor="#082B66" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#59FFFFFF" />
|
||||
android:width="2dp"
|
||||
android:color="#8CFFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
</item>
|
||||
</ripple>
|
||||
|
|
|
|||
|
|
@ -4,18 +4,25 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/bgGuide"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.42" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bgImage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:alpha="0.10"
|
||||
android:alpha="0.16"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/bg_watermark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@id/bgGuide" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleText"
|
||||
|
|
@ -45,42 +52,39 @@
|
|||
|
||||
<FrameLayout
|
||||
android:id="@+id/sendButton"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="256dp"
|
||||
android:layout_width="236dp"
|
||||
android:layout_height="236dp"
|
||||
android:background="@drawable/globe_button_bg"
|
||||
android:clickable="true"
|
||||
android:elevation="12dp"
|
||||
android:focusable="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bgGuide"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.36">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
app:layout_constraintTop_toBottomOf="@id/subtitleText"
|
||||
app:layout_constraintVertical_bias="0.85">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="196dp"
|
||||
android:layout_gravity="center"
|
||||
android:alpha="0.30"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_globe" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:letterSpacing="0.06"
|
||||
android:letterSpacing="0.08"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:shadowColor="#99000000"
|
||||
android:shadowDy="2"
|
||||
android:shadowRadius="8"
|
||||
android:text="@string/send_button"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
|
|
|
|||
Loading…
Reference in a new issue