.
This commit is contained in:
@@ -98,6 +98,11 @@
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
@@ -115,11 +120,7 @@
|
||||
android:name=".cg_subscription.CgSubscriptionActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.ssb.simplitend.articles;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.webkit.WebSettings;
|
||||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ssb.simplitend.databinding.ActivityArticleShowerBinding;
|
||||
|
||||
public class ArticleShowerActivity extends AppCompatActivity {
|
||||
@@ -52,11 +52,19 @@ public class ArticleShowerActivity extends AppCompatActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
binding.progressBar.setVisibility(View.VISIBLE);
|
||||
|
||||
binding.webView.getSettings().setJavaScriptEnabled(true);
|
||||
binding.webView.getSettings().setBuiltInZoomControls(true);
|
||||
binding.webView.getSettings().setDisplayZoomControls(false);
|
||||
|
||||
binding.webView.setWebViewClient(new WebViewClient());
|
||||
binding.webView.setWebViewClient(new WebViewClient(){
|
||||
@Override
|
||||
public void onPageCommitVisible(WebView view, String url) {
|
||||
super.onPageCommitVisible(view, url);
|
||||
binding.progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
binding.webView.loadUrl(url);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
@@ -25,8 +26,6 @@ public class ArticlesActivity extends AppCompatActivity
|
||||
|
||||
private ArticlesAdapter articlesAdapter;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -44,18 +43,14 @@ public class ArticlesActivity extends AppCompatActivity
|
||||
}
|
||||
|
||||
private void getArticles() {
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we fetch the articles");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
binding.noArticles.setVisibility(View.GONE);
|
||||
binding.progressBar.setVisibility(View.VISIBLE);
|
||||
binding.search.setVisibility(View.GONE);
|
||||
|
||||
presenter.getArticles(this);
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
progressDialog = new ProgressDialog(this);
|
||||
|
||||
binding.articlesRv.setLayoutManager(new LinearLayoutManager(this));
|
||||
articlesAdapter = new ArticlesAdapter(this);
|
||||
binding.articlesRv.setAdapter(articlesAdapter);
|
||||
@@ -77,14 +72,24 @@ public class ArticlesActivity extends AppCompatActivity
|
||||
|
||||
@Override
|
||||
public void onArticlesFetched(ArrayList<ArticleResult> articleResults) {
|
||||
progressDialog.dismiss();
|
||||
binding.progressBar.setVisibility(View.GONE);
|
||||
binding.noArticles.setVisibility(View.GONE);
|
||||
binding.search.setVisibility(View.VISIBLE);
|
||||
|
||||
if (articleResults.isEmpty()){
|
||||
binding.noArticles.setVisibility(View.VISIBLE);
|
||||
binding.search.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
articlesAdapter.submitList(articleResults);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArticleFetchFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
binding.progressBar.setVisibility(View.GONE);
|
||||
binding.noArticles.setVisibility(View.VISIBLE);
|
||||
binding.search.setVisibility(View.GONE);
|
||||
|
||||
|
||||
Toast.makeText(this, "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -1,21 +1,58 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.fragments;
|
||||
|
||||
import static com.ssb.simplitend.articles.ArticleShowerActivity.ARTICLE_TITLE;
|
||||
import static com.ssb.simplitend.articles.ArticleShowerActivity.ARTICLE_URL_KEY;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||
import com.google.android.gms.maps.SupportMapFragment;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.maps.model.MarkerOptions;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.articles.ArticleContracts;
|
||||
import com.ssb.simplitend.articles.ArticleResult;
|
||||
import com.ssb.simplitend.articles.ArticleShowerActivity;
|
||||
import com.ssb.simplitend.articles.ArticlesActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
|
||||
import com.ssb.simplitend.cg_geofencing.CgGeoFencingActivity;
|
||||
import com.ssb.simplitend.databinding.CaregiverDashFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
public class DashBoardFragment extends Fragment {
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class DashBoardFragment extends Fragment implements
|
||||
OnMapReadyCallback, ArticleContracts.GetArticleCallback {
|
||||
|
||||
// view binding
|
||||
protected CaregiverDashFragmentBinding binding;
|
||||
|
||||
private CaregiverMainViewModel viewModel;
|
||||
|
||||
private CareGiverData careGiverData;
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
public DashBoardFragment(){
|
||||
// required empty
|
||||
}
|
||||
@@ -24,7 +61,174 @@ public class DashBoardFragment extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CaregiverDashFragmentBinding.inflate(inflater, container, false);
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CaregiverMainViewModel.class);
|
||||
|
||||
CaregiverDataCache.getCaregiverData(requireActivity(), (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
|
||||
setDetails();
|
||||
}), true);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
loadArticles();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void loadArticles() {
|
||||
viewModel.getArticles(this);
|
||||
}
|
||||
|
||||
private void setDetails() {
|
||||
if (careGiverData == null || careGiverData.patientDetails == null){
|
||||
Toast.makeText(requireActivity(), "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
patientData = careGiverData.patientDetails;
|
||||
|
||||
binding.patientName.setText(patientData.first_name);
|
||||
|
||||
setUpMap();
|
||||
}
|
||||
|
||||
private void setUpMap() {
|
||||
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
|
||||
SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager()
|
||||
.findFragmentById(R.id.home_map);
|
||||
if (mapFragment != null) {
|
||||
mapFragment.getMapAsync(this);
|
||||
}else{
|
||||
Toast.makeText(requireActivity(), "Couldn't load map. Please try again.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
Glide.with(requireActivity())
|
||||
.asGif()
|
||||
.load(R.raw.anim_pulse)
|
||||
.into(binding.activityGif);
|
||||
|
||||
Glide.with(requireActivity())
|
||||
.asGif()
|
||||
.load(R.raw.anim_pulse)
|
||||
.into(binding.upComingGif);
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.viewMoreArticle.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(requireActivity(), ArticlesActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
public void setArticleDetails(ArticleResult articleResult){
|
||||
if (articleResult == null) return;
|
||||
|
||||
Glide.with(requireActivity())
|
||||
.load(AppUtil.IMAGE_BASE_URL + articleResult.large_image)
|
||||
.centerCrop()
|
||||
.placeholder(android.R.color.darker_gray)
|
||||
.error(android.R.color.darker_gray)
|
||||
.into(binding.articleImg);
|
||||
|
||||
if (articleResult.article_title == null){
|
||||
articleResult.article_title = "No title";
|
||||
}
|
||||
|
||||
binding.articleTitle.setText(articleResult.article_title);
|
||||
|
||||
if (articleResult.article_author == null){
|
||||
articleResult.article_author = "No author";
|
||||
}
|
||||
|
||||
binding.articleAuthorName.setText(articleResult.article_author);
|
||||
|
||||
try {
|
||||
if (articleResult.created_at == null) throw new Exception();
|
||||
// parsing time of created at
|
||||
SimpleDateFormat format = new SimpleDateFormat(
|
||||
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
|
||||
format.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||
|
||||
Date date = format.parse(articleResult.created_at);
|
||||
if (date == null) throw new Exception();
|
||||
|
||||
SimpleDateFormat pretty_format = new SimpleDateFormat("dd MMM yy, HH:mm a", Locale.getDefault());
|
||||
String time = pretty_format.format(date);
|
||||
|
||||
binding.articleCreatedAt.setText(time);
|
||||
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
String none = "None";
|
||||
binding.articleCreatedAt.setText(none);
|
||||
}
|
||||
|
||||
binding.articleCard.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(requireActivity(), ArticleShowerActivity.class);
|
||||
intent.putExtra(ARTICLE_URL_KEY, articleResult.article_link);
|
||||
intent.putExtra(ARTICLE_TITLE, articleResult.article_title);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArticlesFetched(ArrayList<ArticleResult> articleResults) {
|
||||
if (articleResults == null) return;
|
||||
|
||||
// saving in view model
|
||||
viewModel.setArticleResults(articleResults);
|
||||
|
||||
if (articleResults.size() > 0){
|
||||
binding.articleView.setVisibility(View.VISIBLE);
|
||||
|
||||
setArticleDetails(articleResults.get(0));
|
||||
|
||||
}else{
|
||||
// no articles
|
||||
binding.articleView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArticleFetchFailed(Throwable t, String message) {
|
||||
// do nothing
|
||||
binding.articleView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(@NonNull GoogleMap googleMap) {
|
||||
LatLng latLng;
|
||||
|
||||
// loading patient's location
|
||||
try {
|
||||
if (patientData == null) throw new Exception();
|
||||
|
||||
double lat = Double.parseDouble(patientData.lat);
|
||||
double lng = Double.parseDouble(patientData.lng);
|
||||
|
||||
latLng = new LatLng(lat, lng);
|
||||
}catch (Exception e){
|
||||
// near marine drive
|
||||
latLng = new LatLng(18.93294274664527, 72.82806102186441);
|
||||
}
|
||||
|
||||
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));
|
||||
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(latLng)
|
||||
.title(patientData.first_name + "");
|
||||
|
||||
googleMap.addMarker(markerOptions);
|
||||
googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));;
|
||||
|
||||
googleMap.setOnMapClickListener(latLng1 -> {
|
||||
Intent intent = new Intent(requireActivity(), CgGeoFencingActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,38 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.mvvm;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.ssb.simplitend.articles.ArticleContracts;
|
||||
import com.ssb.simplitend.articles.ArticleResult;
|
||||
import com.yarolegovich.slidingrootnav.SlidingRootNav;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CaregiverMainViewModel extends ViewModel {
|
||||
|
||||
public SlidingRootNav slidingRootNav;
|
||||
|
||||
public CaregiverMainViewModel(){}
|
||||
private final HomeRepository homeRepository;
|
||||
|
||||
private ArrayList<ArticleResult> articleResults;
|
||||
|
||||
public CaregiverMainViewModel(){
|
||||
this.homeRepository = HomeRepository.getHomeRepository();
|
||||
}
|
||||
|
||||
public void setArticleResults(ArrayList<ArticleResult> articleResults) {
|
||||
this.articleResults = articleResults;
|
||||
}
|
||||
|
||||
public void getArticles(@NonNull ArticleContracts.GetArticleCallback articleCallback){
|
||||
if (articleResults == null){
|
||||
homeRepository.getArticles(articleCallback);
|
||||
}else{
|
||||
articleCallback.onArticlesFetched(articleResults);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.mvvm;
|
||||
|
||||
public interface DashboardApiService {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.mvvm;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ssb.simplitend.articles.ArticleContracts;
|
||||
import com.ssb.simplitend.articles.ArticlePresenter;
|
||||
|
||||
public class HomeRepository {
|
||||
|
||||
private static HomeRepository homeRepository;
|
||||
|
||||
private HomeRepository(){}
|
||||
|
||||
public static synchronized HomeRepository getHomeRepository(){
|
||||
if (homeRepository == null){
|
||||
homeRepository = new HomeRepository();
|
||||
}
|
||||
|
||||
return homeRepository;
|
||||
}
|
||||
|
||||
public void getArticles(@NonNull ArticleContracts.GetArticleCallback getArticleCallback){
|
||||
ArticlePresenter articlePresenter = ArticlePresenter.getArticlePresenter();
|
||||
|
||||
articlePresenter.getArticles(getArticleCallback);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,28 +66,54 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
clickEvents();
|
||||
|
||||
// selecting default yearly pack
|
||||
binding.yearCheck.setSelected(true);
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.makePayment.setOnClickListener(view -> {
|
||||
payForSubscription();
|
||||
});
|
||||
|
||||
binding.yearCard.setOnClickListener(v -> {
|
||||
if (!binding.yearCheck.isSelected()){
|
||||
// not selected
|
||||
binding.monthCheck.setSelected(false);
|
||||
binding.yearCheck.setSelected(true);
|
||||
}
|
||||
});
|
||||
|
||||
binding.monthCard.setOnClickListener(v -> {
|
||||
if (!binding.monthCheck.isActivated()){
|
||||
binding.yearCheck.setSelected(false);
|
||||
binding.monthCheck.setSelected(true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void payForSubscription() {
|
||||
if (careGiverData == null){
|
||||
if (careGiverData == null) {
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// int position = binding.viewPager.getCurrentItem();
|
||||
// if (subscriptionPlans == null || position < 0 || position >= subscriptionPlans.size()) {
|
||||
// Toast.makeText(this, "Couldn't load plan.", Toast.LENGTH_SHORT).show();
|
||||
// return;
|
||||
// }
|
||||
if (!binding.monthCheck.isSelected() && !binding.yearCheck.isSelected()){
|
||||
Toast.makeText(this, "Please select a plan", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
int position = 0;
|
||||
|
||||
if (binding.yearCheck.isSelected()){
|
||||
position = 1;
|
||||
}
|
||||
|
||||
if (position >= subscriptionPlans.size()){
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we take you to the payment gateway.");
|
||||
progressDialog.setCancelable(false);
|
||||
@@ -132,18 +158,6 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
// binding.viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
// @Override
|
||||
// public void onPageSelected(int position) {
|
||||
// super.onPageSelected(position);
|
||||
// if (subscriptionPlans == null
|
||||
// || position < 0 || position >= subscriptionPlans.size()) return;
|
||||
//
|
||||
// String btn_text = "Make payment $" + subscriptionPlans.get(position).plan_value;
|
||||
// binding.makePayment.setText(btn_text);
|
||||
// }
|
||||
// });
|
||||
|
||||
// loading subscription plans
|
||||
progressDialog = new ProgressDialog(this);
|
||||
|
||||
@@ -152,7 +166,6 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
|
||||
String token = "Bearer " + AppUtil.getCgToken(this);
|
||||
presenter.getSubscriptionPlans(token, this);
|
||||
|
||||
@@ -179,7 +192,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
}
|
||||
|
||||
private void createSubscription() {
|
||||
if (this.stripe_price_id == null || this.payment_intent_id == null){
|
||||
if (this.stripe_price_id == null || this.payment_intent_id == null) {
|
||||
// something went wrong
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@@ -246,11 +259,6 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
public void onSubscriptionFetched(ArrayList<SubscriptionPlan> subscriptionPlans) {
|
||||
this.subscriptionPlans = subscriptionPlans;
|
||||
progressDialog.dismiss();
|
||||
|
||||
// // loading plans
|
||||
// PlanAdapter planAdapter = new PlanAdapter(subscriptionPlans);
|
||||
// binding.viewPager.setAdapter(planAdapter);
|
||||
// binding.circleIndicator.setViewPager(binding.viewPager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -263,7 +271,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
@Override
|
||||
public void onSubscriptionCreated() {
|
||||
// statically changing the flag of subscription to 1
|
||||
if (careGiverData != null){
|
||||
if (careGiverData != null) {
|
||||
careGiverData.isCaregiverTakeSubscription = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
@@ -19,8 +20,6 @@ public class FAQ_Activity extends AppCompatActivity implements FAQContracts.GETF
|
||||
|
||||
private FAQsPresenter presenter;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
private FAQAdapter faqAdapter;
|
||||
|
||||
@Override
|
||||
@@ -40,8 +39,6 @@ public class FAQ_Activity extends AppCompatActivity implements FAQContracts.GETF
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
progressDialog = new ProgressDialog(this);
|
||||
|
||||
binding.faqsRv.setLayoutManager(new LinearLayoutManager(this));
|
||||
faqAdapter = new FAQAdapter();
|
||||
binding.faqsRv.setAdapter(faqAdapter);
|
||||
@@ -54,17 +51,20 @@ public class FAQ_Activity extends AppCompatActivity implements FAQContracts.GETF
|
||||
}
|
||||
|
||||
private void getFAQs() {
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we fetch the FAQs");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
binding.progressBar.setVisibility(View.VISIBLE);
|
||||
binding.noFaqs.setVisibility(View.GONE);
|
||||
|
||||
presenter.getFAQs(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFAQsFetched(ArrayList<FAQResult> faqResults) {
|
||||
progressDialog.dismiss();
|
||||
binding.progressBar.setVisibility(View.GONE);
|
||||
binding.noFaqs.setVisibility(View.GONE);
|
||||
|
||||
if (faqResults.isEmpty()){
|
||||
binding.noFaqs.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
faqAdapter.submitList(faqResults);
|
||||
|
||||
@@ -72,7 +72,8 @@ public class FAQ_Activity extends AppCompatActivity implements FAQContracts.GETF
|
||||
|
||||
@Override
|
||||
public void onFAQsFetchedFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
binding.progressBar.setVisibility(View.GONE);
|
||||
binding.noFaqs.setVisibility(View.VISIBLE);
|
||||
|
||||
Toast.makeText(this, "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
10
app/src/main/res/drawable/article_home_tint.xml
Normal file
10
app/src/main/res/drawable/article_home_tint.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient android:centerColor="#AD141414"
|
||||
android:startColor="#141414"
|
||||
android:angle="90"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/ic_dash_small.xml
Normal file
12
app/src/main/res/drawable/ic_dash_small.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="23dp"
|
||||
android:height="3dp"
|
||||
android:viewportWidth="23"
|
||||
android:viewportHeight="3">
|
||||
<path
|
||||
android:pathData="M1.5,1.5L21.5,1.5"
|
||||
android:strokeWidth="3"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#fff"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
44
app/src/main/res/drawable/ic_home_notification.xml
Normal file
44
app/src/main/res/drawable/ic_home_notification.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.262dp"
|
||||
android:height="26.5dp"
|
||||
android:viewportWidth="24.262"
|
||||
android:viewportHeight="26.5">
|
||||
<path
|
||||
android:pathData="M10.246,3.013A7.069,7.069 0,0 0,3.173 10.066v3.4a5.605,5.605 0,0 1,-0.672 2.422L1.146,18.13a2.254,2.254 0,0 0,1.273 3.444,24.728 24.728,0 0,0 15.643,0 2.351,2.351 0,0 0,1.273 -3.444l-1.356,-2.245a5.76,5.76 0,0 1,-0.66 -2.422v-3.4A7.084,7.084 0,0 0,10.246 3.013Z"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#141414"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M12.573,3.01a5.81,5.81 0,0 0,-1.222 -0.359A6.2,6.2 0,0 0,7.863 3.01,2.717 2.717,0 0,1 10.218,0.75 2.717,2.717 0,0 1,12.573 3.01Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#141414"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M14.39,22.777c0,1.635 -1.719,2.973 -3.819,2.973a4.44,4.44 0,0 1,-2.7 -0.872,2.7 2.7,0 0,1 -1.12,-2.1"
|
||||
android:strokeWidth="1.5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#141414"/>
|
||||
<path
|
||||
android:pathData="M23.762,19.802A4.247,4.247 0,1 1,19.515 15.555,4.247 4.247,0 0,1 23.762,19.802Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M23.762,19.802A4.247,4.247 0,1 1,19.515 15.555a4.316,4.316 0,0 1,3 1.244A4.154,4.154 0,0 1,23.762 19.802Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ea3829"/>
|
||||
<path
|
||||
android:pathData="M19.515,17.892v2.417"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ea3829"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M19.515,21.689v-0.005"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ea3829"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/ic_pill.xml
Normal file
12
app/src/main/res/drawable/ic_pill.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="18dp"
|
||||
android:viewportWidth="18"
|
||||
android:viewportHeight="18">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M16.586,9.715l0,0 -8.35,-8.3h0a4.81,4.81 0,0 0,-6.827 0,4.872 4.872,0 0,0 0,6.864l8.347,8.3 0,0a4.81,4.81 0,0 0,6.827 0,4.872 4.872,0 0,0 0,-6.864ZM5.786,10.975 L5.779,10.997L2.226,7.467h0a3.712,3.712 0,0 1,0 -5.229,3.664 3.664,0 0,1 5.2,0l0,0 3.683,3.66a6.311,6.311 0,0 0,-1.958 0.77,7.905 7.905,0 0,0 -2.717,2.858A8.124,8.124 0,0 0,5.785 10.975ZM15.774,15.762a3.665,3.665 0,0 1,-5.2 0l0,0L6.723,11.936c0.011,-0.074 0.028,-0.162 0.053,-0.259a6.237,6.237 0,0 1,0.538 -1.351A7.169,7.169 0,0 1,9.137 8.088a5.215,5.215 0,0 1,3.009 -1.161l3.626,3.6h0a3.712,3.712 0,0 1,0 5.229Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M2.842,5.952 L4.089,2.967a1.751,1.751 0,0 0,-1.247 2.981Z"/>
|
||||
</vector>
|
||||
@@ -1,11 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<size android:height="@dimen/_25sdp"
|
||||
android:width="@dimen/_25sdp"/>
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<size android:height="@dimen/_25sdp"
|
||||
android:width="@dimen/_25sdp"/>
|
||||
|
||||
<solid android:color="@color/color_primary"
|
||||
/>
|
||||
<solid android:color="@color/color_primary"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</shape>
|
||||
<item android:drawable="@drawable/ic_done_outline_white"
|
||||
android:gravity="center"/>
|
||||
|
||||
</layer-list>
|
||||
10
app/src/main/res/drawable/sub_check_drawable.xml
Normal file
10
app/src/main/res/drawable/sub_check_drawable.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_selected="false"
|
||||
android:drawable="@drawable/sub_uncheck"/>
|
||||
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/sub_check"/>
|
||||
|
||||
</selector>
|
||||
14
app/src/main/res/drawable/sub_uncheck.xml
Normal file
14
app/src/main/res/drawable/sub_uncheck.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<size android:height="@dimen/_25sdp"
|
||||
android:width="@dimen/_25sdp"/>
|
||||
|
||||
<solid android:color="@color/white"
|
||||
/>
|
||||
|
||||
<stroke android:width="1dp"
|
||||
android:color="@color/color_accent"/>
|
||||
|
||||
</shape>
|
||||
@@ -27,4 +27,13 @@
|
||||
android:layout_below="@id/toolbar"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -74,6 +74,38 @@
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/no_articles"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/no_articles_found"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/articles_rv"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context=".articles.ArticlesActivity">
|
||||
@@ -30,6 +29,38 @@
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/no_faqs"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/no_faqs_found"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/faqs_rv"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
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:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
@@ -23,4 +24,457 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
|
||||
android:src="@drawable/ic_home_notification"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_below="@id/top_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="always"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="5dp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/patient_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/none"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
android:background="@color/color_primary"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="75dp"
|
||||
/>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/home_map"
|
||||
android:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_100sdp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/activity_gif"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/on_going_activity"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
|
||||
android:src="@drawable/ic_white_dot"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:tint="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Currently at doctors appointment"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
android:background="@color/color_primary"
|
||||
android:layout_marginVertical="10dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/up_coming_gif"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/upcoming_activity"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
|
||||
android:src="@drawable/ic_white_dot"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:tint="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Doctors appointment at 19 : 00"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_accent"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Remind Medicines in 24 mins"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:drawablePadding="15dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_pill"
|
||||
app:drawableTint="@color/color_primary_dark" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_primary_dark"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Remind Medicines in 24 mins"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:drawablePadding="15dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_dash_small"
|
||||
app:drawableTint="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/article_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="1dp"
|
||||
|
||||
app:cardCornerRadius="15dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
|
||||
app:cardElevation="5dp"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/article_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
app:cardCornerRadius="10dp"
|
||||
android:layout_margin="5dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/article_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_180sdp"
|
||||
|
||||
android:src="@drawable/ic_sub_1"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:scaleType="fitXY"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_180sdp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="bottom"
|
||||
android:background="@drawable/article_home_tint"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/article_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="What are the treatments for Dementia?"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/author_img"
|
||||
android:layout_width="@dimen/_20sdp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
|
||||
android:src="@drawable/static_3"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/article_author_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/aditya_gaikwad"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:ems="4"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
|
||||
android:src="@drawable/ic_white_dot"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/article_created_at"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="02 sep 23, 11;23 am"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/view_more_article"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/view_more"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
|
||||
android:layout_gravity="end"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:padding="5dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -3,8 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
@@ -35,6 +35,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
||||
app:cardCornerRadius="25dp"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="1dp"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -44,10 +52,9 @@
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none"
|
||||
android:overScrollMode="never"
|
||||
android:layout_above="@id/make_payment"
|
||||
>
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -55,6 +62,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/year_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -65,6 +73,8 @@
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="1dp"
|
||||
|
||||
app:rippleColor="@color/color_accent"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -73,21 +83,36 @@
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/year_check"
|
||||
<LinearLayout
|
||||
android:id="@+id/year_check_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/year"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
<ImageView
|
||||
android:id="@+id/year_check"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
app:buttonIcon="@drawable/sub_check"
|
||||
android:src="@drawable/sub_check_drawable"
|
||||
|
||||
android:padding="10dp"
|
||||
/>
|
||||
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/year"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -96,7 +121,7 @@
|
||||
|
||||
android:background="@drawable/edit_text_bg"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:padding="10dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:text="@string/_25"
|
||||
|
||||
android:textColor="@color/black"
|
||||
@@ -110,8 +135,9 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/year_check"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_below="@id/year_check_view"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
@@ -194,6 +220,7 @@
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/month_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -204,6 +231,8 @@
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="1dp"
|
||||
|
||||
app:rippleColor="@color/color_accent"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -212,17 +241,35 @@
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/month_check"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/monthly"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
<ImageView
|
||||
android:id="@+id/month_check"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
/>
|
||||
android:src="@drawable/sub_check_drawable"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/monthly"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -267,13 +314,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book a galley of type and scrambled it to make a type specimen book a galley of type and scrambled it to make a type specimen book."
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book a galley of type and scrambled it to make a type specimen book a galley of type and scrambled it to make a type specimen book."
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_12ssp"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
BIN
app/src/main/res/raw/anim_pulse.gif
Normal file
BIN
app/src/main/res/raw/anim_pulse.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -370,6 +370,12 @@
|
||||
<string name="monthly">Monthly</string>
|
||||
<string name="_5_95">$5.95</string>
|
||||
<string name="year_">/year</string>
|
||||
<string name="on_going_activity">On going activity</string>
|
||||
<string name="upcoming_activity">Upcoming activity</string>
|
||||
<string name="none">None</string>
|
||||
<string name="view_more"><u>view more</u></string>
|
||||
<string name="no_articles_found">No articles found!</string>
|
||||
<string name="no_faqs_found">No FAQs found!</string>
|
||||
|
||||
<string-array name="radius_units">
|
||||
<item>Kms</item>
|
||||
|
||||
Reference in New Issue
Block a user