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"
|
applicationId = "com.example.maposition"
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 5
|
versionCode = 6
|
||||||
versionName = "1.4"
|
versionName = "1.5"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.Typeface
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
|
@ -125,11 +128,20 @@ class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
groupChips.visibility = View.VISIBLE
|
groupChips.visibility = View.VISIBLE
|
||||||
val active = Prefs.getActiveGroup(this)!!
|
val active = Prefs.getActiveGroup(this)!!
|
||||||
|
val blue = ContextCompat.getColor(this, R.color.brand_blue)
|
||||||
groups.forEach { g ->
|
groups.forEach { g ->
|
||||||
|
val checked = g.name == active.name
|
||||||
val chip = Chip(this).apply {
|
val chip = Chip(this).apply {
|
||||||
text = g.name
|
text = g.name
|
||||||
isCheckable = true
|
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 {
|
setOnClickListener {
|
||||||
Prefs.setActiveGroupName(this@MainActivity, g.name)
|
Prefs.setActiveGroupName(this@MainActivity, g.name)
|
||||||
refreshRecipientsCard()
|
refreshRecipientsCard()
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,42 @@
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="#40FFFFFF">
|
android:color="#40FFFFFF">
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<layer-list>
|
||||||
<gradient
|
<!-- Halo extérieur -->
|
||||||
android:type="radial"
|
<item>
|
||||||
android:centerX="0.35"
|
<shape android:shape="oval">
|
||||||
android:centerY="0.28"
|
<solid android:color="#1C4A9DFF" />
|
||||||
android:gradientRadius="200dp"
|
</shape>
|
||||||
android:startColor="#4A9DFF"
|
</item>
|
||||||
android:centerColor="#1E63C8"
|
<item
|
||||||
android:endColor="#0A2F73" />
|
android:bottom="9dp"
|
||||||
<stroke
|
android:left="9dp"
|
||||||
android:width="3dp"
|
android:right="9dp"
|
||||||
android:color="#59FFFFFF" />
|
android:top="9dp">
|
||||||
</shape>
|
<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.33"
|
||||||
|
android:centerY="0.25"
|
||||||
|
android:gradientRadius="190dp"
|
||||||
|
android:startColor="#5FB0FF"
|
||||||
|
android:centerColor="#1E63C8"
|
||||||
|
android:endColor="#082B66" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="#8CFFFFFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
</item>
|
</item>
|
||||||
</ripple>
|
</ripple>
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,25 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<ImageView
|
||||||
android:id="@+id/bgImage"
|
android:id="@+id/bgImage"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:alpha="0.10"
|
android:alpha="0.16"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/bg_watermark"
|
android:src="@drawable/bg_watermark"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="@id/bgGuide" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/titleText"
|
android:id="@+id/titleText"
|
||||||
|
|
@ -45,42 +52,39 @@
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/sendButton"
|
android:id="@+id/sendButton"
|
||||||
android:layout_width="256dp"
|
android:layout_width="236dp"
|
||||||
android:layout_height="256dp"
|
android:layout_height="236dp"
|
||||||
android:background="@drawable/globe_button_bg"
|
android:background="@drawable/globe_button_bg"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:elevation="12dp"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/bgGuide"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/subtitleText"
|
||||||
app:layout_constraintVertical_bias="0.36">
|
app:layout_constraintVertical_bias="0.85">
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
|
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_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:letterSpacing="0.08"
|
||||||
|
android:lineSpacingExtra="4dp"
|
||||||
<ImageView
|
android:shadowColor="#99000000"
|
||||||
android:layout_width="88dp"
|
android:shadowDy="2"
|
||||||
android:layout_height="88dp"
|
android:shadowRadius="8"
|
||||||
android:importantForAccessibility="no"
|
android:text="@string/send_button"
|
||||||
android:src="@drawable/ic_globe" />
|
android:textColor="@color/white"
|
||||||
|
android:textSize="17sp"
|
||||||
<TextView
|
android:textStyle="bold" />
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:letterSpacing="0.06"
|
|
||||||
android:text="@string/send_button"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue