location updates structure
This commit is contained in:
2
.idea/deploymentTargetDropDown.xml
generated
2
.idea/deploymentTargetDropDown.xml
generated
@@ -12,7 +12,7 @@
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-12-21T15:11:48.465744Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2023-12-22T13:25:43.333124Z" />
|
||||
<targetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
|
||||
@@ -4,30 +4,15 @@ import static android.content.Context.NOTIFICATION_SERVICE;
|
||||
import static com.app.simplitend.apputils.AppUtil.NOTIFICATION_ACTION;
|
||||
import static com.app.simplitend.apputils.Constants.ACTIVITY_TIME;
|
||||
import static com.app.simplitend.apputils.Constants.MEDICINE_TIME;
|
||||
import static com.app.simplitend.patientgeofencing.GeoFenceHelper.GEOFENCE_ID;
|
||||
import static com.app.simplitend.patientgeofencing.GeoFenceHelper.GEOFENCE_TAG;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresPermission;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.app.simplitend.patientgeofencing.GeoFenceHelper;
|
||||
import com.google.android.gms.location.Geofence;
|
||||
import com.google.android.gms.location.GeofencingClient;
|
||||
import com.google.android.gms.location.GeofencingRequest;
|
||||
import com.google.android.gms.location.LocationServices;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.onesignal.OneSignal;
|
||||
import com.onesignal.notifications.INotificationReceivedEvent;
|
||||
import com.onesignal.notifications.INotificationServiceExtension;
|
||||
@@ -36,7 +21,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class NotificationService implements INotificationServiceExtension {
|
||||
@@ -61,7 +45,7 @@ public class NotificationService implements INotificationServiceExtension {
|
||||
{
|
||||
List<StatusBarNotification> active_notifications = Arrays.asList(notificationManager.getActiveNotifications());
|
||||
|
||||
int minPostTime = Integer.MAX_VALUE;
|
||||
long minPostTime = Long.MAX_VALUE;
|
||||
StatusBarNotification notification = null;
|
||||
for (StatusBarNotification not: active_notifications){
|
||||
if (not.getPostTime() < minPostTime){
|
||||
|
||||
@@ -5,6 +5,7 @@ import static com.app.simplitend.articles.ArticleShowerActivity.ARTICLE_TITLE;
|
||||
import static com.app.simplitend.articles.ArticleShowerActivity.ARTICLE_URL_KEY;
|
||||
import static com.app.simplitend.caregiverdashboard.activities.EditProfileInfoActivity.IS_CAREGIVER;
|
||||
import static com.app.simplitend.cg_geofencing.CgGeoFencingActivity.GEOFENCE_DETAILS_KEY;
|
||||
import static com.app.simplitend.cg_geofencing.CgGeoFencingActivity.TO_SHOW_LOCATION_UPDATES_KEY;
|
||||
import static com.app.simplitend.patient_dashboard.NotificationsActivity.USER_ID;
|
||||
import static com.app.simplitend.patient_dashboard.NotificationsActivity.USER_TOKEN;
|
||||
|
||||
@@ -464,6 +465,7 @@ public class CgDashBoardFragment extends Fragment implements
|
||||
gotoGeofenceActivity = false;
|
||||
Intent intent = new Intent(requireActivity(), CgGeoFencingActivity.class);
|
||||
intent.putExtra(GEOFENCE_DETAILS_KEY, geoFenceDetails);
|
||||
intent.putExtra(TO_SHOW_LOCATION_UPDATES_KEY, true);
|
||||
startActivity(intent);
|
||||
}else{
|
||||
// load into home screen map view
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
@@ -51,6 +52,7 @@ import com.google.android.libraries.places.api.Places;
|
||||
import com.google.android.libraries.places.api.model.Place;
|
||||
import com.google.android.libraries.places.widget.Autocomplete;
|
||||
import com.google.android.libraries.places.widget.model.AutocompleteActivityMode;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -70,6 +72,7 @@ public class CgGeoFencingActivity extends AppCompatActivity implements OnMapRead
|
||||
private CaregiverMainViewModel viewModel;
|
||||
|
||||
public static final String GEOFENCE_DETAILS_KEY = "geofence_details";
|
||||
public static final String TO_SHOW_LOCATION_UPDATES_KEY = "to_show_location_updates";
|
||||
private GeoFenceDetails geoFenceDetails;
|
||||
|
||||
private static final String MILES = "miles";
|
||||
@@ -99,6 +102,8 @@ public class CgGeoFencingActivity extends AppCompatActivity implements OnMapRead
|
||||
|
||||
private String selectedStreet;
|
||||
|
||||
protected boolean showLocationUpdates;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -118,6 +123,9 @@ public class CgGeoFencingActivity extends AppCompatActivity implements OnMapRead
|
||||
} catch (Exception e) {
|
||||
pat_cur_latLng = null;
|
||||
}
|
||||
|
||||
showLocationUpdates = intent.getBooleanExtra(TO_SHOW_LOCATION_UPDATES_KEY, false);
|
||||
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Couldn't load Geofence.", Toast.LENGTH_SHORT).show();
|
||||
geoFenceDetails = new GeoFenceDetails();
|
||||
@@ -153,6 +161,26 @@ public class CgGeoFencingActivity extends AppCompatActivity implements OnMapRead
|
||||
|
||||
establishSocketConnection();
|
||||
|
||||
if (showLocationUpdates){
|
||||
changeToLocationUpdatesView();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void changeToLocationUpdatesView() {
|
||||
binding.seniorNameTitle.setVisibility(View.VISIBLE);
|
||||
binding.lastUpdated.setVisibility(View.VISIBLE);
|
||||
|
||||
binding.geofencingSubTitle.setVisibility(View.GONE);
|
||||
binding.geofencingTitle.setVisibility(View.GONE);
|
||||
binding.updateGeofenceBox.setVisibility(View.GONE);
|
||||
binding.homeLocationBtn.setVisibility(View.GONE);
|
||||
binding.cgLocationBtn.setVisibility(View.GONE);
|
||||
|
||||
binding.locationBs.setVisibility(View.VISIBLE);
|
||||
|
||||
BottomSheetBehavior<LinearLayout> bs_behavior = BottomSheetBehavior.from(binding.locationBs);
|
||||
bs_behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,299 +1,450 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="35sp"
|
||||
android:layout_height="35sp"
|
||||
android:layout_margin="15dp"
|
||||
android:contentDescription="@string/back_button"
|
||||
android:padding="5dp"
|
||||
android:paddingStart="-15dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:src="@drawable/arrow_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/geofencing"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/set_specific_geographic_areas_and_receive_instant_alerts_when_your_loved_one_leaves_the_geofenced_zone"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginVertical="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/geofence_map"
|
||||
android:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/search"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="@dimen/_10sdp"
|
||||
android:layout_marginTop="@dimen/_10sdp"
|
||||
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardElevation="5dp"
|
||||
|
||||
app:strokeWidth="0.5dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
|
||||
app:cardCornerRadius="20dp"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/enter_new_address_here"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_search_outline"
|
||||
android:drawablePadding="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_below="@id/search"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="@dimen/_10sdp"
|
||||
android:layout_marginTop="@dimen/_10sdp"
|
||||
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardElevation="5dp"
|
||||
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
|
||||
app:cardCornerRadius="10dp"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance_away_txt"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/destination_0_5m_away"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/senior_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/senior_address"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_address"
|
||||
android:layout_below="@id/senior_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_toStartOf="@id/set_gf"
|
||||
|
||||
android:text="@string/loading"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/set_gf"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
|
||||
android:padding="3dp"
|
||||
app:srcCompat="@drawable/ic_setting"
|
||||
app:tint="@color/black" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/change_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_below="@+id/home_address"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:text="@string/change"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textAllCaps="false"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/update_btns_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:weightSum="2">
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:gravity="center_vertical"
|
||||
android:elevation="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset_btn"
|
||||
android:layout_width="0dp"
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/back_button"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/quantum_ic_arrow_back_grey600_24"
|
||||
app:tint="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
android:text="@string/cancel"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textAllCaps="false"
|
||||
<TextView
|
||||
android:id="@+id/senior_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:backgroundTint="@color/white"
|
||||
app:cornerRadius="5dp"
|
||||
android:visibility="gone"
|
||||
|
||||
/>
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:singleLine="true"
|
||||
android:text="Aditya"
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/update_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
android:text="@string/update"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textAllCaps="false"
|
||||
<TextView
|
||||
android:id="@+id/last_updated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="5dp"
|
||||
android:visibility="gone"
|
||||
|
||||
/>
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:singleLine="true"
|
||||
android:text="Last updated now "
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_location_btn"
|
||||
<TextView
|
||||
android:id="@+id/geofencing_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/img_pat_curr_location"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/geofencing"
|
||||
android:textColor="@color/black"
|
||||
|
||||
app:backgroundTint="@color/white"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:visibility="visible"
|
||||
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="5dp"
|
||||
>
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/img_home_marker"
|
||||
android:layout_margin="8dp"/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cg_location_Btn"
|
||||
<TextView
|
||||
android:id="@+id/geofencing_sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/img_pat_curr_location"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/set_specific_geographic_areas_and_receive_instant_alerts_when_your_loved_one_leaves_the_geofenced_zone"
|
||||
|
||||
app:backgroundTint="@color/white"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:visibility="visible"
|
||||
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="5dp"
|
||||
>
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/geofence_map"
|
||||
android:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/_10sdp"
|
||||
|
||||
android:layout_marginTop="@dimen/_10sdp"
|
||||
android:visibility="gone"
|
||||
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="20dp"
|
||||
|
||||
app:cardElevation="5dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
|
||||
app:strokeWidth="0.5dp"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:drawablePadding="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:text="@string/enter_new_address_here"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
|
||||
android:textSize="@dimen/_14ssp"
|
||||
app:drawableStartCompat="@drawable/ic_search_outline"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/update_geofence_box"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_below="@id/search"
|
||||
android:layout_marginHorizontal="@dimen/_10sdp"
|
||||
|
||||
android:layout_marginTop="@dimen/_10sdp"
|
||||
android:visibility="visible"
|
||||
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="10dp"
|
||||
|
||||
app:cardElevation="5dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
|
||||
app:strokeWidth="1dp"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance_away_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/destination_0_5m_away"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:visibility="gone"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/senior_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/senior_address"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/senior_title"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_toStartOf="@id/set_gf"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:maxLines="2"
|
||||
android:text="@string/loading"
|
||||
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/set_gf"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
|
||||
android:padding="3dp"
|
||||
app:srcCompat="@drawable/ic_setting"
|
||||
app:tint="@color/black" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/change_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_below="@+id/home_address"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/change"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/update_btns_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="15dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:weightSum="2">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/cancel"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/black"
|
||||
|
||||
app:backgroundTint="@color/white"
|
||||
app:cornerRadius="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/update_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:layout_weight="1"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/update"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_location_btn"
|
||||
android:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:src="@drawable/img_pat_curr_location"
|
||||
android:layout_margin="8dp"/>
|
||||
app:backgroundTint="@color/white"
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="5dp">
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/img_home_marker" />
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cg_location_Btn"
|
||||
android:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="15dp"
|
||||
android:src="@drawable/img_pat_curr_location"
|
||||
|
||||
app:backgroundTint="@color/white"
|
||||
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/img_pat_curr_location" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/location_bs"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:orientation="vertical"
|
||||
app:behavior_hideable="false"
|
||||
app:behavior_peekHeight="42dp"
|
||||
android:background="@drawable/top_round_corner"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<View
|
||||
android:id="@+id/bs_dash"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
>
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/bs_senior_image"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
||||
android:src="@drawable/static_3" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Aditya"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
|
||||
android:layout_gravity="center_vertical"
|
||||
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="On new link road"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="0.25 miles away from home"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
Reference in New Issue
Block a user