Skip to content

Commit c36eb2d

Browse files
authored
Merge pull request #37 from arduino/feature/missing-quick-link-settings
Feature/missing quick link settings
2 parents 8bba7db + 0910a4e commit c36eb2d

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

OpenScienceJournal/whistlepunk_library/src/main/java/com/google/android/apps/forscience/whistlepunk/signin/ArduinoSettingsActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.annotation.SuppressLint;
44
import android.content.Intent;
5+
import android.net.Uri;
56
import android.os.Bundle;
67
import android.view.View;
78
import android.widget.CompoundButton;
@@ -64,6 +65,7 @@ protected void onCreate(Bundle savedInstanceState) {
6465
mSyncSwitch = findViewById(R.id.section_google_drive_switch);
6566
mSyncSwitch.setOnCheckedChangeListener(mSwitchListener);
6667
findViewById(R.id.section_google_drive_switch_change).setOnClickListener(v -> startActivity(new Intent(this, GDriveSyncSetupActivity.class)));
68+
findViewById(R.id.redirect_to_id_page_image_view).setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://id.arduino.cc"))));
6769
}
6870

6971
@Override

OpenScienceJournal/whistlepunk_library/src/main/res/layout/activity_arduino_auth_settings.xml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"
67
android:background="@color/arduino_white">
@@ -20,7 +21,7 @@
2021
android:layout_width="40dp"
2122
android:layout_height="40dp"
2223
android:layout_marginStart="18dp"
23-
android:background="@null"
24+
android:background="?selectableItemBackgroundBorderless"
2425
android:contentDescription="@null"
2526
android:scaleType="centerInside"
2627
android:src="@drawable/ic_arduino_auth_close"
@@ -47,7 +48,7 @@
4748
android:layout_width="0dp"
4849
android:layout_height="wrap_content"
4950
android:layout_marginStart="15dp"
50-
android:layout_marginEnd="30dp"
51+
android:layout_marginEnd="15dp"
5152
android:ellipsize="end"
5253
android:fontFamily="@font/open_sans_bold"
5354
android:gravity="center"
@@ -90,24 +91,39 @@
9091
android:layout_width="0dp"
9192
android:layout_height="wrap_content"
9293
android:layout_marginTop="15dp"
94+
android:layout_marginEnd="15dp"
9395
android:fontFamily="@font/open_sans"
9496
android:textColor="@color/arduino_gris"
9597
android:textSize="16sp"
96-
app:layout_constraintEnd_toEndOf="parent"
98+
app:layout_constraintEnd_toStartOf="@id/redirect_to_id_page_image_view"
9799
app:layout_constraintStart_toStartOf="parent"
98-
app:layout_constraintTop_toBottomOf="@id/section_arduino_account" />
100+
app:layout_constraintTop_toBottomOf="@id/section_arduino_account"
101+
tools:text="Lil Nickname" />
99102

100103
<TextView
101104
android:id="@+id/section_arduino_account_email"
102105
android:layout_width="0dp"
103106
android:layout_height="wrap_content"
104107
android:layout_marginTop="2.5dp"
108+
android:layout_marginEnd="15dp"
105109
android:fontFamily="@font/open_sans_bold"
106110
android:textColor="@color/arduino_gris"
107111
android:textSize="12sp"
108-
app:layout_constraintEnd_toEndOf="parent"
112+
app:layout_constraintEnd_toStartOf="@id/redirect_to_id_page_image_view"
109113
app:layout_constraintStart_toStartOf="parent"
110-
app:layout_constraintTop_toBottomOf="@id/section_arduino_account_nickname" />
114+
app:layout_constraintTop_toBottomOf="@id/section_arduino_account_nickname"
115+
tools:text="account@email.com" />
116+
117+
<ImageButton
118+
android:id="@+id/redirect_to_id_page_image_view"
119+
android:layout_width="wrap_content"
120+
android:layout_height="wrap_content"
121+
android:background="?selectableItemBackgroundBorderless"
122+
android:padding="8dp"
123+
android:src="@drawable/ic_external"
124+
app:layout_constraintBottom_toBottomOf="@id/section_arduino_account_email"
125+
app:layout_constraintEnd_toEndOf="parent"
126+
app:layout_constraintTop_toTopOf="@id/section_arduino_account_nickname" />
111127

112128
<androidx.constraintlayout.widget.ConstraintLayout
113129
android:id="@+id/section_google_drive_sync_layout"
@@ -117,7 +133,8 @@
117133
android:visibility="gone"
118134
app:layout_constraintEnd_toEndOf="parent"
119135
app:layout_constraintStart_toStartOf="parent"
120-
app:layout_constraintTop_toBottomOf="@id/section_arduino_account_email">
136+
app:layout_constraintTop_toBottomOf="@id/section_arduino_account_email"
137+
tools:visibility="visible">
121138

122139
<View
123140
android:id="@+id/section_google_drive_sync_separator"
@@ -178,12 +195,14 @@
178195
android:visibility="gone"
179196
app:layout_constraintEnd_toEndOf="parent"
180197
app:layout_constraintStart_toStartOf="parent"
181-
app:layout_constraintTop_toBottomOf="@id/section_google_drive_switch_layout">
198+
app:layout_constraintTop_toBottomOf="@id/section_google_drive_switch_layout"
199+
tools:visibility="visible">
182200

183201
<TextView
184202
android:id="@+id/section_google_drive_switch_change"
185203
android:layout_width="wrap_content"
186204
android:layout_height="wrap_content"
205+
android:background="?selectableItemBackgroundBorderless"
187206
android:fontFamily="@font/open_sans_bold"
188207
android:text="@string/arduino_auth_settings_section_sync_change"
189208
android:textAllCaps="true"

0 commit comments

Comments
 (0)