Skip to content

Commit

Permalink
feature(Instructions and Permissions): Added icons and list of action…
Browse files Browse the repository at this point in the history
…s and list of permissions
  • Loading branch information
CremaLuca committed Jan 17, 2020
1 parent 841a5ef commit fcec57c
Show file tree
Hide file tree
Showing 15 changed files with 261 additions and 48 deletions.
6 changes: 6 additions & 0 deletions .idea/render.experimental.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added app/src/main/res/drawable/ic_sms_message_filled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ic_sms_message_outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 162 additions & 24 deletions app/src/main/res/layout/activity_instructions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,191 @@
android:background="@color/white"
tools:context="com.gruppo4.ringUp.InstructionsActivity">

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="206dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/instruction_image" />

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="370dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="32dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView">


<TextView
android:id="@+id/welcome_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-thin"
android:paddingBottom="16dp"
android:paddingBottom="24dp"
android:text="@string/how_ring_up_works"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="24sp"
android:textStyle="bold" />

<TextView
android:id="@+id/permissions_text_view"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/instruction_step_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:text="@string/instructions_text"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="18sp" />
android:layout_height="match_parent"
android:paddingBottom="@dimen/list_padding_bottom_spacing">

<TextView
android:id="@+id/instruction_step_1_text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:text="@string/instructions_step_1"
android:textAlignment="center"
android:gravity="center_vertical"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/instruction_step_1_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/instruction_step_1_text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_phonelink_lock_white_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/instruction_step_2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/list_padding_bottom_spacing">

<TextView
android:id="@+id/instruction_step_2_text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:text="@string/instructions_step_2"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/instruction_step_2_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/instruction_step_2_text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_new_releases_white_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/instruction_step_3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/list_padding_bottom_spacing">

<TextView
android:id="@+id/instruction_step_3_text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:text="@string/instructions_step_3"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/instruction_step_3_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/instruction_step_3_text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_group_white_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/instruction_step_4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/list_padding_bottom_spacing">

<TextView
android:id="@+id/instruction_step_4_text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:text="@string/instructions_step_4"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/instruction_step_4_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/instruction_step_4_text"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_ring_volume_white_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="206dp"
android:layout_marginTop="100dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/instruction_image" />

<Button
android:id="@+id/set_pass_button"
Expand All @@ -64,7 +203,6 @@
android:text="@string/set_pass_button_text"
android:textColor="@color/white"
android:textColorHighlight="@color/nice_grey"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
Expand Down
85 changes: 72 additions & 13 deletions app/src/main/res/layout/activity_permissions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="370dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginStart="32dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="20dp"
android:layout_marginEnd="32dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -31,16 +31,76 @@
android:textSize="24sp"
android:textStyle="bold" />

<TextView
android:id="@+id/permissions_text_view"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/sms_permission_explanation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:text="@string/permissions_text"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="18sp" />
android:layout_height="match_parent"
android:paddingBottom="16dp">

<TextView
android:id="@+id/sms_permission_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:text="@string/sms_permission_explanation"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/sms_permission_image_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/sms_permission_text_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_textsms_white_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/contact_list_permission_explanation"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@+id/contact_list_permission_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:fontFamily="sans-serif-light"
android:text="@string/contacts_permission_explanation"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/contact_list_permissions_image_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/contact_list_permission_text_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/outline_contacts_black_18dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>

Expand All @@ -66,7 +126,6 @@
android:text="@string/give_permissions_button_text"
android:textColor="@color/white"
android:textColorHighlight="@color/nice_grey"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<string name="give_permissions_button_text">Capito</string>
<string name="hint_password">password</string>
<string name="hint_phone_number">numero di telefono</string>
<string name="instructions_text">RingUp aiuta a trovare il telefono se lo hai perso. Basta inserire il numero di telefono e la password. Per far si che altri possano aiutarti a trovare il telefono devi impostare la password del TUO dispositivo.</string>
<string name="menu_change_password">Cambia password</string>
<string name="text_notification_button">Ferma</string>
<string name="text_stop_ring_dialog">Il telefono sta squillando, puoi fermarlo da qui.</string>
Expand All @@ -30,7 +29,13 @@
<string name="description_SMSPermission">Questa applicazione utilizza gli SMS per la comunicazione tra telefoni.</string>
<string name="description_contactsPermission">Questa applicazione usa la lista dei contatti per selezionare i contatti a cui far squillare il telefono.</string>
<string name="how_ring_up_works">Come funziona RingUp?</string>
<string name="set_pass_button_text">Imposta password</string>
<string name="set_dialog_button_text">IMPOSTA</string>
<string name="permissions_text">Per poter trovare un telefono e fare in modo che altri trovino il tuo, RingUp ha bisogno dei permessi per inviare e ricevere SMS. Inoltre l\'app ha bisogno di poter leggere i contatti dalla rubrica.</string>
<string name="set_pass_button_text">Imposta la password</string>
<string name="set_dialog_button_text">Imposta</string>
<string name="permission_explanation">Perché RingUp funzioni correttamente, ha bisogno dei seguenti permessi:</string>
<string name="contacts_permission_explanation">Quando vuoi far squillare un altro telefono potrai selezionare un contatto dalla lista dei contatti.</string>
<string name="sms_permission_explanation">L\'app non usa la connessione dati e deve essere in grado di inviare e ricevere messaggi SMS.</string>
<string name="instructions_step_1">Imposta la password del tuo telefono</string>
<string name="instructions_step_2">Dimenticati dove hai lasciato il telefono</string>
<string name="instructions_step_3">Chiedi a qualcuno di installare quest\'app e mandati un RingUp</string>
<string name="instructions_step_4">Ascolta attentamente se senti la tua suoneria e trova il tuo telefono!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_size">17sp</dimen>
<dimen name="list_padding_bottom_spacing">16dp</dimen>
</resources>
Loading

0 comments on commit fcec57c

Please sign in to comment.