Added initial "ShareLocation" UI
Added the UI and some base logic for the share location logic, which still needs to be enhanced with actual GPS and database logic.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -34,10 +35,14 @@ dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||
implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
|
||||
|
||||
//Firebase Dependencies
|
||||
implementation platform('com.google.firebase:firebase-bom:33.10.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.firebaseui:firebase-ui-auth:7.2.0'
|
||||
implementation("com.google.firebase:firebase-firestore")
|
||||
implementation("com.google.firebase:firebase-crashlytics")
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
|
||||
@@ -20,6 +20,7 @@ import androidx.core.content.ContextCompat;
|
||||
import com.aldo.apps.familyhelpers.ui.HelperGroupTile;
|
||||
import com.aldo.apps.familyhelpers.ui.SleepTimerPopup;
|
||||
import com.aldo.apps.familyhelpers.utils.DevicePolicyManagerHelper;
|
||||
import com.aldo.apps.familyhelpers.workers.DatabaseHelper;
|
||||
import com.firebase.ui.auth.AuthUI;
|
||||
import com.firebase.ui.auth.FirebaseAuthUIActivityResultContract;
|
||||
import com.firebase.ui.auth.FirebaseUiException;
|
||||
@@ -43,6 +44,11 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
*/
|
||||
private HelperGroupTile mSleepTimerTile;
|
||||
|
||||
/**
|
||||
* {@link HelperGroupTile} holding the option to share your current location.
|
||||
*/
|
||||
private HelperGroupTile mShareLocationTile;
|
||||
|
||||
/**
|
||||
* Instance of the {@link DevicePolicyManagerHelper} to roll out device specific actions.
|
||||
*/
|
||||
@@ -56,7 +62,12 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
/**
|
||||
* The currently active {@link FirebaseUser}.
|
||||
*/
|
||||
private FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();;
|
||||
private FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();
|
||||
|
||||
/**
|
||||
* The instance of the {@link DatabaseHelper}.
|
||||
*/
|
||||
private DatabaseHelper mDbHelper;
|
||||
|
||||
/**
|
||||
* The {@link ActivityResultLauncher} to ask for the NotificationPermission.
|
||||
@@ -95,6 +106,7 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
} else {
|
||||
mWelcomeMessageView.setText(String.format(getString(R.string.welcome_message_placeholder),
|
||||
mCurrentUser.getDisplayName()));
|
||||
mDbHelper = new DatabaseHelper();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +115,7 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
super.onResume();
|
||||
mDevicePolicyHelper = DevicePolicyManagerHelper.getInstance(this);
|
||||
initSleepTimer();
|
||||
initShareLocation();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,10 +144,26 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
Log.d(TAG, "launchHelper: Clicked SleepTimer");
|
||||
}
|
||||
};
|
||||
mSleepTimerTile.setLogo(R.drawable.icn_sleep_timer);
|
||||
mSleepTimerTile.setLogo(R.drawable.ic_sleep_timer);
|
||||
mSleepTimerTile.setTitle(R.string.title_sleep_timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to initialize the sleepTimer tile.
|
||||
*/
|
||||
private void initShareLocation() {
|
||||
mShareLocationTile = new HelperGroupTile(findViewById(R.id.tile_share_location)) {
|
||||
@Override
|
||||
public void launchHelper() {
|
||||
Log.d(TAG, "launchHelper: Clicked ShareLocation");
|
||||
}
|
||||
};
|
||||
mShareLocationTile.setLogo(R.drawable.ic_share_location);
|
||||
mShareLocationTile.setTitle(R.string.title_share_location);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to request the NotificationPermission as it is required for the service to run.
|
||||
*
|
||||
@@ -155,6 +184,11 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the result of the sign in flow.
|
||||
*
|
||||
* @param result The result code, used to determine whether is succeeded or not.
|
||||
*/
|
||||
private void onSignInResult(final FirebaseAuthUIAuthenticationResult result) {
|
||||
final IdpResponse idpResponse = result.getIdpResponse();
|
||||
if (result.getResultCode() == RESULT_OK) {
|
||||
@@ -162,6 +196,7 @@ public class HelperGridActivity extends AppCompatActivity {
|
||||
Log.d(TAG, "onSignInResult: Successfully logged in [" + mCurrentUser.getDisplayName() + "]");
|
||||
mWelcomeMessageView.setText(String.format(getString(R.string.welcome_message_placeholder),
|
||||
mCurrentUser.getDisplayName()));
|
||||
mDbHelper = new DatabaseHelper();
|
||||
} else {
|
||||
Log.w(TAG, "onSignInResult: Sign-In failed");
|
||||
mWelcomeMessageView.setText(String.format(getString(R.string.welcome_message_placeholder),
|
||||
|
||||
118
app/src/main/java/com/aldo/apps/familyhelpers/model/User.java
Normal file
118
app/src/main/java/com/aldo/apps/familyhelpers/model/User.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package com.aldo.apps.familyhelpers.model;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import com.google.firebase.auth.FirebaseUser;
|
||||
import com.google.firebase.auth.FirebaseUserMetadata;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
|
||||
/**
|
||||
* Model class for a {@link User}.
|
||||
*/
|
||||
public class User {
|
||||
|
||||
/**
|
||||
* Unique Identifies of the user.
|
||||
*/
|
||||
private String uId;
|
||||
|
||||
/**
|
||||
* The displayName of the user.
|
||||
*/
|
||||
private String displayName;
|
||||
|
||||
/**
|
||||
* {@link String} representation of the {@link Uri} pointing to the users profilePhoto.
|
||||
*/
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* The Date timestamp when this user was created.
|
||||
*/
|
||||
private long creationDate;
|
||||
|
||||
/**
|
||||
* //Empty C'Tor for database usage.
|
||||
*/
|
||||
public User() {
|
||||
//Empty C'Tor for database usage.
|
||||
}
|
||||
|
||||
/**
|
||||
* C'Tor filling all arguments.
|
||||
*
|
||||
* @param uId Unique Identifies of the user.
|
||||
* @param displayName The displayName of the user.
|
||||
* @param photoUrl {@link String} representation of the {@link Uri} pointing to the users profilePhoto.
|
||||
* @param creationDate The Date timestamp when this user was created.
|
||||
*/
|
||||
public User(final String uId, final String displayName, final String photoUrl, final long creationDate) {
|
||||
this.uId = uId;
|
||||
this.displayName = displayName;
|
||||
this.photoUrl = photoUrl;
|
||||
this.creationDate = creationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unique Identifies of the user.
|
||||
*
|
||||
* @return The unique Identifies of the user.
|
||||
*/
|
||||
public String getuId() {
|
||||
return uId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the displayName of the user.
|
||||
*
|
||||
* @return The displayName of the user.
|
||||
*/
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link String} representation of the {@link Uri} pointing to the users profilePhoto.
|
||||
*
|
||||
* @return The {@link String} representation of the {@link Uri} pointing to the users profilePhoto.
|
||||
*/
|
||||
public String getPhotoUrl() {
|
||||
return photoUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Date timestamp when this user was created.
|
||||
*
|
||||
* @return The Date timestamp when this user was created.
|
||||
*/
|
||||
public long getCreationDate() {
|
||||
return creationDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link User} from a handed in {@link FirebaseUser}.
|
||||
*
|
||||
* @param firebaseUser The {@link FirebaseUser} to read the fields from.
|
||||
*
|
||||
* @return The {@link User} representation of the {@link FirebaseUser}, or null if no
|
||||
* {@link FirebaseUser} is available.
|
||||
*/
|
||||
public static User fromFirebaseUser(final FirebaseUser firebaseUser) {
|
||||
if (firebaseUser == null) {
|
||||
return null;
|
||||
}
|
||||
final String uid = firebaseUser.getUid();
|
||||
final String displayName = firebaseUser.getDisplayName();
|
||||
final Uri photoUrl = firebaseUser.getPhotoUrl();
|
||||
final FirebaseUserMetadata metaData = firebaseUser.getMetadata();
|
||||
final long creationDate;
|
||||
if (metaData == null) {
|
||||
creationDate = LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
|
||||
} else {
|
||||
creationDate = metaData.getCreationTimestamp();
|
||||
}
|
||||
return new User(uid,displayName, photoUrl == null ? null : photoUrl.toString(), creationDate);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.aldo.apps.familyhelpers.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@@ -100,8 +101,14 @@ public abstract class HelperGroupTile implements View.OnClickListener {
|
||||
* @param logoId The {@link DrawableRes} id of the logo to be shown.
|
||||
*/
|
||||
public void setLogo(@DrawableRes final int logoId) {
|
||||
final Context context = mContextRef.get();
|
||||
if (mHelperLogo != null) {
|
||||
mHelperLogo.setImageResource(logoId);
|
||||
if (context != null) {
|
||||
mHelperLogo.setColorFilter(context.getColor(
|
||||
R.color.md_theme_primary), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
} else {
|
||||
Log.d(TAG, "setLogo: Cannot set Logo for [" + mHelperName + "]");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.aldo.apps.familyhelpers.utils;
|
||||
|
||||
public final class DatabaseConstants {
|
||||
|
||||
public static final String DB_COLL_USERS = "users";
|
||||
|
||||
public static final String DB_DOC_USER_ID = "uId";
|
||||
|
||||
private DatabaseConstants() {
|
||||
//Private C'Tor to prevent instantiation.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.aldo.apps.familyhelpers.workers;
|
||||
|
||||
import static com.aldo.apps.familyhelpers.utils.DatabaseConstants.DB_COLL_USERS;
|
||||
import static com.aldo.apps.familyhelpers.utils.DatabaseConstants.DB_DOC_USER_ID;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import com.aldo.apps.familyhelpers.model.User;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.auth.FirebaseUser;
|
||||
import com.google.firebase.firestore.FirebaseFirestore;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
/**
|
||||
* Helper class to encapsulate all {@link FirebaseFirestore} related logic.
|
||||
*/
|
||||
public class DatabaseHelper {
|
||||
|
||||
/**
|
||||
* Tag for debugging purpose.
|
||||
*/
|
||||
private static final String TAG = "DatabaseHelper";
|
||||
|
||||
/**
|
||||
* The {@link FirebaseFirestore} instance.
|
||||
*/
|
||||
private final FirebaseFirestore mDatabase;
|
||||
|
||||
/**
|
||||
* The currently logged in {@link FirebaseUser}.
|
||||
*/
|
||||
private final FirebaseUser mCurrentUser;
|
||||
|
||||
/**
|
||||
* Local {@link BehaviorSubject} representation holding the {@link List} of all registered {@link User}s.
|
||||
*/
|
||||
private final BehaviorSubject<List<User>> mAllUsers = BehaviorSubject.create();
|
||||
|
||||
/**
|
||||
* C'tor.
|
||||
*/
|
||||
public DatabaseHelper() {
|
||||
mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();
|
||||
mDatabase = FirebaseFirestore.getInstance();
|
||||
insertOrUpdateUser();
|
||||
subscribeToAllUsers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to insertOrUpdate the currently logged in user into the database.
|
||||
*/
|
||||
private void insertOrUpdateUser() {
|
||||
final User user = User.fromFirebaseUser(mCurrentUser);
|
||||
mDatabase.collection(DB_COLL_USERS).document(user.getuId()).set(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to all available {@link User}s in the database.
|
||||
*/
|
||||
private void subscribeToAllUsers() {
|
||||
mDatabase.collection(DB_COLL_USERS)
|
||||
.whereNotEqualTo(DB_DOC_USER_ID, mCurrentUser.getUid())
|
||||
.addSnapshotListener((value, error) -> {
|
||||
if (error != null) {
|
||||
Log.e(TAG, "onEvent: ", error);
|
||||
return;
|
||||
}
|
||||
if (value != null && !value.isEmpty()) {
|
||||
final List<User> allUsers = new ArrayList<>();
|
||||
value.getDocuments()
|
||||
.forEach(documentSnapshot
|
||||
-> allUsers.add(documentSnapshot.toObject(User.class)));
|
||||
mAllUsers.onNext(allUsers);
|
||||
} else {
|
||||
Log.w(TAG, "onEvent: Read failed, do not update local values.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,45 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="@color/md_theme_inverseOnSurface_highContrast" />
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="@color/md_theme_inverseOnSurface_highContrast" />
|
||||
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="@color/md_theme_outline_highContrast" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="@color/md_theme_outline_highContrast" />
|
||||
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="7dp"
|
||||
android:bottomRightRadius="7dp"
|
||||
android:topLeftRadius="7dp"
|
||||
android:topRightRadius="7dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="@color/md_theme_inverseOnSurface_mediumContrast" />
|
||||
<corners
|
||||
android:bottomLeftRadius="7dp"
|
||||
android:bottomRightRadius="7dp"
|
||||
android:topLeftRadius="7dp"
|
||||
android:topRightRadius="7dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<solid android:color="@color/md_theme_inverseOnSurface_mediumContrast" />
|
||||
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="@color/md_theme_outline_mediumContrast" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="@color/md_theme_outline_mediumContrast" />
|
||||
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="7dp"
|
||||
android:bottomRightRadius="7dp"
|
||||
android:topLeftRadius="7dp"
|
||||
android:topRightRadius="7dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
<corners
|
||||
android:bottomLeftRadius="7dp"
|
||||
android:bottomRightRadius="7dp"
|
||||
android:topLeftRadius="7dp"
|
||||
android:topRightRadius="7dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
|
||||
18
app/src/main/res/drawable/ic_share_location.xml
Normal file
18
app/src/main/res/drawable/ic_share_location.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="800dp"
|
||||
android:height="800dp"
|
||||
android:viewportWidth="100"
|
||||
android:viewportHeight="100">
|
||||
<path
|
||||
android:pathData="M49.8,23.59c-7.83,0 -15.6,3.37 -14.78,10.1l2,14.62c0.35,2.57 2.09,6.69 4.69,6.69h0.19l2.13,24.53c0.09,1.1 0.89,2 2,2h8c1.11,0 1.91,-0.9 2,-2L58.14,55h0.19c2.6,0 4.34,-4.11 4.69,-6.69l2,-14.62c0.52,-6.73 -7.38,-10.1 -15.22,-10.1z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M50.02,50.91l-0.05,0.13c0.02,-0.04 0.03,-0.08 0.04,-0.12l0,-0.01z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M50,10.5m-10.5,0a10.5,10.5 0,1 1,21 0a10.5,10.5 0,1 1,-21 0"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M60.92,69.09c-0.09,0.97 -0.17,1.94 -0.26,2.91C69.61,73.27 76.25,76.14 77,79.69c1.12,5.28 -16.14,7.65 -27.26,7.54c-11.12,-0.11 -28.06,-2.26 -26.58,-7.54c0.97,-3.46 7.51,-6.27 16.23,-7.58c-0.09,-0.98 -0.19,-1.95 -0.27,-2.92c-11.21,1.24 -20.54,4.28 -24.27,8.25H2.23L0,82.05h13.17c1.02,5.44 12.43,10.14 28.73,11.32L41.34,100h16.14l-0.16,-6.63c16.39,-1.19 28.12,-5.88 29.51,-11.32H100l-1.91,-4.62H85.47c-3.54,-4.07 -13.05,-7.16 -24.55,-8.33z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
41
app/src/main/res/drawable/ic_sleep_timer.xml
Normal file
41
app/src/main/res/drawable/ic_sleep_timer.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="800dp"
|
||||
android:height="800dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M366.3,744.8h524.5l-21.2,-303.6c-0,0 -401.1,-0.1 -503.2,303.6z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M943.3,744.8v159.8h-863.2v-159.8h800.1z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M240.8,499.8c57,0 103.2,46.2 103.2,103.1s-46.2,103.2 -103.2,103.2 -103.1,-46.2 -103.1,-103.2 46.2,-103.1 103.1,-103.1z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M80.1,986.7a22.4,22.4 0,0 1,-22.4 -22.4v-529.2a22.4,22.4 0,1 1,44.8 0v529.2a22.4,22.4 0,0 1,-22.4 22.4zM943.3,986.7a22.4,22.4 0,0 1,-22.4 -22.4v-305.4a22.4,22.4 0,1 1,44.8 0v305.4c0,12.4 -10,22.4 -22.4,22.4z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M943.3,767.1h-863.2a22.4,22.4 0,1 1,0 -44.8h863.2a22.4,22.4 0,1 1,0 44.8z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M240.8,728.5c-69.2,0 -125.5,-56.3 -125.5,-125.5 0,-69.2 56.3,-125.5 125.5,-125.5 69.2,0 125.5,56.3 125.5,125.5 0,69.2 -56.3,125.5 -125.5,125.5zM240.8,522.2c-44.5,0 -80.8,36.2 -80.8,80.8 0,44.5 36.2,80.8 80.8,80.8 44.5,0 80.8,-36.2 80.8,-80.8 0,-44.5 -36.2,-80.8 -80.8,-80.8zM371.9,766.8a22.4,22.4 0,0 1,-22.4 -22.4c0,-82.6 58.1,-166.2 159.4,-229.4 102.4,-63.8 234.2,-99 371.3,-99a22.4,22.4 0,1 1,0 44.8c-128.8,0 -252.2,32.7 -347.6,92.2 -87.9,54.8 -138.3,124.6 -138.3,191.4a22.4,22.4 0,0 1,-22.4 22.4z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M880.2,767.1a22.4,22.4 0,0 1,-22.4 -22.4v-306.4a22.4,22.4 0,1 1,44.8 0v306.4a22.4,22.4 0,0 1,-22.4 22.4zM477.7,429.5h-167.8a22.4,22.4 0,0 1,-12.3 -41.1l105.6,-69.6H309.8a22.4,22.4 0,1 1,0 -44.8h167.8a22.4,22.4 0,0 1,12.3 41.1l-105.6,69.6h93.2a22.4,22.4 0,1 1,0 44.8zM636.6,205.7h-103a22.4,22.4 0,0 1,-12.3 -41.1l40.7,-26.8h-28.4a22.4,22.4 0,1 1,0 -44.8h103a22.4,22.4 0,0 1,12.3 41.1l-40.7,26.8h28.4a22.4,22.4 0,1 1,0 44.8zM868.4,136.5h-87a22.4,22.4 0,0 1,-12.3 -41.1l24.7,-16.3h-12.4a22.4,22.4 0,1 1,0 -44.8h87a22.4,22.4 0,0 1,12.3 41.1l-24.7,16.3h12.4a22.4,22.4 0,1 1,0 44.8zM943.3,927h-863.2a22.4,22.4 0,1 1,0 -44.8h863.2a22.4,22.4 0,1 1,0 44.8z"
|
||||
android:strokeWidth="0.01024"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#000000"/>
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<vector android:height="200dp" android:viewportHeight="1024"
|
||||
android:viewportWidth="1024" android:width="200dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#5FCEFF" android:pathData="M366.3,744.8h524.5l-21.2,-303.6c-0,0 -401.1,-0.1 -503.2,303.6z"/>
|
||||
<path android:fillColor="#8B87C1" android:pathData="M943.3,744.8v159.8h-863.2v-159.8h800.1z"/>
|
||||
<path android:fillColor="#FFB578" android:pathData="M240.8,499.8c57,0 103.2,46.2 103.2,103.1s-46.2,103.2 -103.2,103.2 -103.1,-46.2 -103.1,-103.2 46.2,-103.1 103.1,-103.1z"/>
|
||||
<path android:fillColor="#4F46A3" android:pathData="M80.1,986.7a22.4,22.4 0,0 1,-22.4 -22.4v-529.2a22.4,22.4 0,1 1,44.8 0v529.2a22.4,22.4 0,0 1,-22.4 22.4zM943.3,986.7a22.4,22.4 0,0 1,-22.4 -22.4v-305.4a22.4,22.4 0,1 1,44.8 0v305.4c0,12.4 -10,22.4 -22.4,22.4z"/>
|
||||
<path android:fillColor="#4F46A3" android:pathData="M943.3,767.1h-863.2a22.4,22.4 0,1 1,0 -44.8h863.2a22.4,22.4 0,1 1,0 44.8z"/>
|
||||
<path android:fillColor="#4F46A3" android:pathData="M240.8,728.5c-69.2,0 -125.5,-56.3 -125.5,-125.5 0,-69.2 56.3,-125.5 125.5,-125.5 69.2,0 125.5,56.3 125.5,125.5 0,69.2 -56.3,125.5 -125.5,125.5zM240.8,522.2c-44.5,0 -80.8,36.2 -80.8,80.8 0,44.5 36.2,80.8 80.8,80.8 44.5,0 80.8,-36.2 80.8,-80.8 0,-44.5 -36.2,-80.8 -80.8,-80.8zM371.9,766.8a22.4,22.4 0,0 1,-22.4 -22.4c0,-82.6 58.1,-166.2 159.4,-229.4 102.4,-63.8 234.2,-99 371.3,-99a22.4,22.4 0,1 1,0 44.8c-128.8,0 -252.2,32.7 -347.6,92.2 -87.9,54.8 -138.3,124.6 -138.3,191.4a22.4,22.4 0,0 1,-22.4 22.4z"/>
|
||||
<path android:fillColor="#4F46A3" android:pathData="M880.2,767.1a22.4,22.4 0,0 1,-22.4 -22.4v-306.4a22.4,22.4 0,1 1,44.8 0v306.4a22.4,22.4 0,0 1,-22.4 22.4zM477.7,429.5h-167.8a22.4,22.4 0,0 1,-12.3 -41.1l105.6,-69.6H309.8a22.4,22.4 0,1 1,0 -44.8h167.8a22.4,22.4 0,0 1,12.3 41.1l-105.6,69.6h93.2a22.4,22.4 0,1 1,0 44.8zM636.6,205.7h-103a22.4,22.4 0,0 1,-12.3 -41.1l40.7,-26.8h-28.4a22.4,22.4 0,1 1,0 -44.8h103a22.4,22.4 0,0 1,12.3 41.1l-40.7,26.8h28.4a22.4,22.4 0,1 1,0 44.8zM868.4,136.5h-87a22.4,22.4 0,0 1,-12.3 -41.1l24.7,-16.3h-12.4a22.4,22.4 0,1 1,0 -44.8h87a22.4,22.4 0,0 1,12.3 41.1l-24.7,16.3h12.4a22.4,22.4 0,1 1,0 44.8zM943.3,927h-863.2a22.4,22.4 0,1 1,0 -44.8h863.2a22.4,22.4 0,1 1,0 44.8z"/>
|
||||
</vector>
|
||||
@@ -30,5 +30,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<include layout="@layout/helper_group_tile_item"
|
||||
android:id="@+id/tile_share_location"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -17,7 +17,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:src="@drawable/icn_sleep_timer"/>
|
||||
tools:src="@drawable/ic_sleep_timer"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_helper_group_title"
|
||||
@@ -29,7 +29,7 @@
|
||||
tools:text="Sleep Timer"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/md_theme_onBackground_highContrast"
|
||||
android:textColor="@color/md_theme_primary"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
@@ -19,4 +19,7 @@
|
||||
<string name="sleep_timer_remaining_time_with_hour">%02d:%02d:%02d"</string>
|
||||
<string name="sleep_timer_remaining_time_without_hour">%02d:%02d"</string>
|
||||
|
||||
<!-- Share Location Funtionality Strings -->
|
||||
<string name="title_share_location">Share Location</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user