v1.3 : refonte visuelle — fond en filigrane et bouton globe terrestre
- Illustration de l'appli en fond d'écran (alpha 10%, centerCrop) sur les deux écrans - Bouton d'envoi : sphère bleue en dégradé radial (effet globe 3D) avec icône globe et libellé, ripple et élévation ; grisé pendant l'envoi - En-tête avec sous-titre descriptif, carte destinataires avec élévation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
d065c19972
commit
c7a753627b
8 changed files with 120 additions and 26 deletions
|
|
@ -23,8 +23,8 @@ android {
|
|||
applicationId = "com.example.maposition"
|
||||
minSdk = 21
|
||||
targetSdk = 36
|
||||
versionCode = 3
|
||||
versionName = "1.2"
|
||||
versionCode = 4
|
||||
versionName = "1.3"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import com.google.android.gms.location.FusedLocationProviderClient
|
|||
import com.google.android.gms.location.LocationServices
|
||||
import com.google.android.gms.location.Priority
|
||||
import com.google.android.gms.tasks.CancellationTokenSource
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.card.MaterialCardView
|
||||
import com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
|
@ -49,7 +48,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
private lateinit var sendButton: MaterialButton
|
||||
private lateinit var sendButton: View
|
||||
private lateinit var statusText: TextView
|
||||
private lateinit var progress: CircularProgressIndicator
|
||||
private lateinit var recipientsText: TextView
|
||||
|
|
@ -166,6 +165,7 @@ class MainActivity : AppCompatActivity() {
|
|||
busy = true
|
||||
resetReportState()
|
||||
sendButton.isEnabled = false
|
||||
sendButton.alpha = 0.55f
|
||||
progress.visibility = View.VISIBLE
|
||||
setStatus(getString(R.string.status_locating))
|
||||
|
||||
|
|
@ -285,6 +285,7 @@ class MainActivity : AppCompatActivity() {
|
|||
busy = false
|
||||
progress.visibility = View.GONE
|
||||
sendButton.isEnabled = true
|
||||
sendButton.alpha = 1f
|
||||
}
|
||||
|
||||
private fun resetReportState() {
|
||||
|
|
|
|||
BIN
app/src/main/res/drawable-nodpi/bg_watermark.jpg
Normal file
BIN
app/src/main/res/drawable-nodpi/bg_watermark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
19
app/src/main/res/drawable/globe_button_bg.xml
Normal file
19
app/src/main/res/drawable/globe_button_bg.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#40FFFFFF">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="0.35"
|
||||
android:centerY="0.28"
|
||||
android:gradientRadius="200dp"
|
||||
android:startColor="#4A9DFF"
|
||||
android:centerColor="#1E63C8"
|
||||
android:endColor="#0A2F73" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#59FFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
9
app/src/main/res/drawable/ic_globe.xml
Normal file
9
app/src/main/res/drawable/ic_globe.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,19.93c-3.95,-0.49 -7,-3.85 -7,-7.93 0,-0.62 0.08,-1.21 0.21,-1.79L9,15v1c0,1.1 0.9,2 2,2v1.93zM17.9,17.39c-0.26,-0.81 -1,-1.39 -1.9,-1.39h-1v-3c0,-0.55 -0.45,-1 -1,-1L8,12v-2h2c0.55,0 1,-0.45 1,-1L11,7h2c1.1,0 2,-0.9 2,-2v-0.41c2.93,1.19 5,4.06 5,7.41 0,2.08 -0.8,3.97 -2.1,5.39z" />
|
||||
</vector>
|
||||
|
|
@ -2,51 +2,98 @@
|
|||
<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"
|
||||
android:padding="24dp">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bgImage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:alpha="0.10"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="26sp"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/settingsButton"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitleText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/subtitle"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/settingsButton"
|
||||
app:layout_constraintStart_toStartOf="@id/titleText"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/settingsButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/settings_title"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleText"
|
||||
app:layout_constraintBottom_toBottomOf="@id/subtitleText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/titleText"
|
||||
app:tint="?attr/colorOnSurfaceVariant" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<FrameLayout
|
||||
android:id="@+id/sendButton"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="240dp"
|
||||
android:text="@string/send_button"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@color/brand_blue"
|
||||
app:cornerRadius="120dp"
|
||||
app:icon="@drawable/ic_pin"
|
||||
app:iconGravity="top"
|
||||
app:iconSize="44dp"
|
||||
app:iconTint="@color/white"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="256dp"
|
||||
android:background="@drawable/globe_button_bg"
|
||||
android:clickable="true"
|
||||
android:elevation="12dp"
|
||||
android:focusable="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.38" />
|
||||
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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_globe" />
|
||||
|
||||
<TextView
|
||||
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>
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
|
|
@ -64,7 +111,9 @@
|
|||
android:id="@+id/statusText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:gravity="center"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -75,9 +124,11 @@
|
|||
android:id="@+id/recipientsCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="3dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
|
@ -92,9 +143,9 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/recipients_label"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?attr/colorOnSurfaceVariant" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recipientsText"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout 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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.07"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/bg_watermark" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
@ -74,3 +86,4 @@
|
|||
app:cornerRadius="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<resources>
|
||||
<string name="app_name">Ma Position</string>
|
||||
<string name="settings_title">Paramètres</string>
|
||||
<string name="subtitle">Votre position par SMS, en un geste</string>
|
||||
<string name="back">Retour</string>
|
||||
|
||||
<!-- Écran principal -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue