.
This commit is contained in:
@@ -90,6 +90,10 @@ dependencies {
|
||||
|
||||
implementation 'com.yarolegovich:sliding-root-nav:1.1.1'
|
||||
|
||||
// views animation
|
||||
implementation 'com.daimajia.easing:library:2.4@aar'
|
||||
implementation 'com.daimajia.androidanimations:library:2.4@aar'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
|
||||
<activity
|
||||
android:name=".caregiverdashboard.CaregiverDashActivity"
|
||||
android:exported="true" >
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".careperson_dashboard.DashBoardActivityCP"
|
||||
android:name=".patient_dashboard.DashBoardActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
|
||||
@@ -1,48 +1,49 @@
|
||||
package com.ssb.simplitend.caregiverdashboard;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.CaregiverChatsFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.DashBoardFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.MyPatientFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
|
||||
import com.ssb.simplitend.databinding.CaregiverDashboardBinding;
|
||||
import com.yarolegovich.slidingrootnav.SlidingRootNav;
|
||||
import com.ssb.simplitend.customsviews.HomeBottomNav;
|
||||
import com.ssb.simplitend.customsviews.MenuItem;
|
||||
import com.ssb.simplitend.databinding.CaregiverDashboardActivityBinding;
|
||||
import com.ssb.simplitend.databinding.CaregiverDashboardMenuBinding;
|
||||
import com.yarolegovich.slidingrootnav.SlidingRootNavBuilder;
|
||||
import com.yarolegovich.slidingrootnav.callback.DragStateListener;
|
||||
import com.yarolegovich.slidingrootnav.util.DrawerListenerAdapter;
|
||||
|
||||
public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
DragStateListener{
|
||||
DragStateListener,
|
||||
HomeBottomNav.OnBottomNavItemSelectListener {
|
||||
|
||||
// view binding
|
||||
protected CaregiverDashboardBinding binding;
|
||||
protected CaregiverDashboardActivityBinding binding;
|
||||
private CaregiverDashboardMenuBinding menuBinding;
|
||||
|
||||
protected CaregiverMainViewModel viewModel;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = CaregiverDashboardBinding.inflate(getLayoutInflater());
|
||||
binding = CaregiverDashboardActivityBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
binding.btn.setOnClickListener(view -> {
|
||||
ObjectAnimator objAnim = ObjectAnimator.ofFloat(view, "translationX", -100f);
|
||||
objAnim.setDuration(100);
|
||||
objAnim.start();
|
||||
});
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
@@ -50,16 +51,50 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
// viewmodel
|
||||
viewModel = new ViewModelProvider(this).get(CaregiverMainViewModel.class);
|
||||
|
||||
// inflating menu view
|
||||
menuBinding = CaregiverDashboardMenuBinding.inflate(getLayoutInflater());
|
||||
|
||||
// sliding navigation bar
|
||||
viewModel.slidingRootNav = null;
|
||||
viewModel.slidingRootNav = new SlidingRootNavBuilder(this)
|
||||
.withMenuLayout(R.layout.caregiver_dashboard_menu)
|
||||
.withMenuView(menuBinding.getRoot())
|
||||
.addDragStateListener(this)
|
||||
.withToolbarMenuToggle(binding.toolbar)
|
||||
.withRootViewScale(0.8f)
|
||||
.withDragDistance(250)
|
||||
.inject();
|
||||
|
||||
binding.bottomNav.setItemSelectListener(this);
|
||||
|
||||
// initializing dashboard fragment
|
||||
replaceFragment(new DashBoardFragment());
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
// menu click events
|
||||
menuBinding.close.setOnClickListener(v -> {
|
||||
if (viewModel.slidingRootNav.isMenuOpened()){
|
||||
viewModel.slidingRootNav.closeMenu(true);
|
||||
}
|
||||
});
|
||||
|
||||
// content click events
|
||||
binding.tint.setOnClickListener(v -> {
|
||||
if (viewModel.slidingRootNav.isMenuOpened()){
|
||||
viewModel.slidingRootNav.closeMenu(true);
|
||||
binding.tint.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void replaceFragment(Fragment fragment){
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_cg_home, fragment)
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
// slide bar drag callbacks
|
||||
@Override
|
||||
public void onDragStart() {
|
||||
@@ -70,8 +105,35 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
public void onDragEnd(boolean isMenuOpened) {
|
||||
if (isMenuOpened){
|
||||
binding.getRoot().setRadius(30);
|
||||
binding.tint.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
binding.getRoot().setRadius(0);
|
||||
binding.tint.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomNavItemSelected(MenuItem selectedItem) {
|
||||
if (selectedItem == MenuItem.DASHBOARD){
|
||||
replaceFragment(new DashBoardFragment());
|
||||
|
||||
// setting up toolbar accordingly
|
||||
binding.toolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_menu));
|
||||
binding.toolbar.setNavigationIconTint(getResources().getColor(R.color.black));
|
||||
binding.toolbar.setTitle("Welcome Aditya");
|
||||
|
||||
}else if (selectedItem == MenuItem.MY_PATIENT){
|
||||
replaceFragment(new MyPatientFragment());
|
||||
|
||||
// setting up toolbar accordingly
|
||||
binding.toolbar.setTitle(null);
|
||||
binding.toolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_menu));
|
||||
binding.toolbar.setNavigationIconTint(getResources().getColor(R.color.white));
|
||||
}else if (selectedItem == MenuItem.CHATS){
|
||||
replaceFragment(new CaregiverChatsFragment());
|
||||
binding.toolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_menu));
|
||||
binding.toolbar.setNavigationIconTint(getResources().getColor(R.color.black));
|
||||
binding.toolbar.setTitle("Chats");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.databinding.CaregiverChatsFragmentBinding;
|
||||
|
||||
public class CaregiverChatsFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected CaregiverChatsFragmentBinding binding;
|
||||
|
||||
public CaregiverChatsFragment(){
|
||||
// required empty
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CaregiverChatsFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.databinding.CaregiverDashFragmentBinding;
|
||||
|
||||
public class DashBoardFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected CaregiverDashFragmentBinding binding;
|
||||
|
||||
public DashBoardFragment(){
|
||||
// required empty
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CaregiverDashFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.databinding.CaregiverDashFragmentBinding;
|
||||
import com.ssb.simplitend.databinding.MyPatientFragmentBinding;
|
||||
|
||||
public class MyPatientFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected MyPatientFragmentBinding binding;
|
||||
|
||||
public MyPatientFragment(){
|
||||
// required empty
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = MyPatientFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ssb.simplitend.caregiverdashboard.mvvm;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.yarolegovich.slidingrootnav.SlidingRootNav;
|
||||
|
||||
public class CaregiverMainViewModel extends ViewModel {
|
||||
|
||||
@@ -4,14 +4,26 @@ import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.daimajia.androidanimations.library.Techniques;
|
||||
import com.daimajia.androidanimations.library.YoYo;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.ssb.simplitend.R;
|
||||
|
||||
public class HomeBottomNav extends FrameLayout {
|
||||
|
||||
// views
|
||||
private FloatingActionButton dashBtnBig, patientBig, chatsBig;
|
||||
private LinearLayout dashSmall, patientSmall, chatsSmall;
|
||||
|
||||
// fields
|
||||
private MenuItem selected_item = MenuItem.DASHBOARD;
|
||||
|
||||
private OnBottomNavItemSelectListener itemSelectListener;
|
||||
|
||||
// constructors
|
||||
public HomeBottomNav(@NonNull Context context) {
|
||||
@@ -31,6 +43,135 @@ public class HomeBottomNav extends FrameLayout {
|
||||
|
||||
private void initViews(){
|
||||
View view = inflate(getContext(), R.layout.home_bottom_nav, this);
|
||||
|
||||
dashBtnBig = view.findViewById(R.id.dadh_big);
|
||||
dashSmall = view.findViewById(R.id.dash_small);
|
||||
|
||||
patientBig = view.findViewById(R.id.patient_big);
|
||||
patientSmall = view.findViewById(R.id.patient_small);
|
||||
|
||||
chatsBig = view.findViewById(R.id.chat_big);
|
||||
chatsSmall = view.findViewById(R.id.chats_small);
|
||||
|
||||
clickEvents();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
dashSmall.setOnClickListener(v -> {
|
||||
selectMenuItem(MenuItem.DASHBOARD);
|
||||
if (itemSelectListener != null) {
|
||||
itemSelectListener.onBottomNavItemSelected(MenuItem.DASHBOARD);
|
||||
}
|
||||
});
|
||||
|
||||
chatsSmall.setOnClickListener(v -> {
|
||||
selectMenuItem(MenuItem.CHATS);
|
||||
if (itemSelectListener != null) {
|
||||
itemSelectListener.onBottomNavItemSelected(MenuItem.CHATS);
|
||||
}
|
||||
});
|
||||
|
||||
patientSmall.setOnClickListener(v -> {
|
||||
selectMenuItem(MenuItem.MY_PATIENT);
|
||||
if (itemSelectListener != null) {
|
||||
itemSelectListener.onBottomNavItemSelected(MenuItem.MY_PATIENT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setItemSelectListener(OnBottomNavItemSelectListener itemSelectListener) {
|
||||
this.itemSelectListener = itemSelectListener;
|
||||
}
|
||||
|
||||
private void selectMenuItem(MenuItem menuitem){
|
||||
|
||||
clearItemSelection(this.selected_item);
|
||||
|
||||
this.selected_item = menuitem;
|
||||
|
||||
FloatingActionButton selectedBig = null;
|
||||
LinearLayout selectedSmall = null;
|
||||
|
||||
switch (menuitem){
|
||||
case DASHBOARD:
|
||||
selectedBig = dashBtnBig;
|
||||
selectedSmall = dashSmall;
|
||||
break;
|
||||
case CHATS:
|
||||
selectedBig = chatsBig;
|
||||
selectedSmall = chatsSmall;
|
||||
break;
|
||||
case MY_PATIENT:
|
||||
selectedBig = patientBig;
|
||||
selectedSmall = patientSmall;
|
||||
break;
|
||||
}
|
||||
|
||||
final FloatingActionButton final_selectedBig = selectedBig;
|
||||
final LinearLayout final_selectedSmall = selectedSmall;
|
||||
|
||||
if (final_selectedBig != null && final_selectedSmall != null){
|
||||
|
||||
YoYo.with(Techniques.SlideOutUp)
|
||||
.duration(100)
|
||||
.onEnd(animator -> {
|
||||
final_selectedBig.setVisibility(VISIBLE);
|
||||
final_selectedSmall.setVisibility(GONE);
|
||||
|
||||
YoYo.with(Techniques.SlideInUp)
|
||||
.duration(100)
|
||||
.playOn(final_selectedBig);
|
||||
})
|
||||
.playOn(final_selectedSmall);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void clearItemSelection(MenuItem selected_item) {
|
||||
FloatingActionButton selectedBig = null;
|
||||
LinearLayout selectedSmall = null;
|
||||
|
||||
switch (selected_item){
|
||||
case DASHBOARD:
|
||||
selectedBig = dashBtnBig;
|
||||
selectedSmall = dashSmall;
|
||||
break;
|
||||
case CHATS:
|
||||
selectedBig = chatsBig;
|
||||
selectedSmall = chatsSmall;
|
||||
break;
|
||||
case MY_PATIENT:
|
||||
selectedBig = patientBig;
|
||||
selectedSmall = patientSmall;
|
||||
break;
|
||||
}
|
||||
|
||||
final FloatingActionButton final_selectedBig = selectedBig;
|
||||
final LinearLayout final_selectedSmall = selectedSmall;
|
||||
|
||||
if (final_selectedBig != null && final_selectedSmall != null){
|
||||
|
||||
YoYo.with(Techniques.SlideOutDown)
|
||||
.duration(100)
|
||||
.onEnd(animator -> {
|
||||
final_selectedBig.setVisibility(GONE);
|
||||
final_selectedSmall.setVisibility(VISIBLE);
|
||||
|
||||
YoYo.with(Techniques.SlideInDown)
|
||||
.duration(100)
|
||||
.playOn(final_selectedSmall);
|
||||
})
|
||||
.playOn(final_selectedBig);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// callback interfaces
|
||||
@FunctionalInterface
|
||||
public interface OnBottomNavItemSelectListener{
|
||||
void onBottomNavItemSelected(MenuItem selectedItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ssb.simplitend.customsviews;
|
||||
|
||||
public enum MenuItem {
|
||||
MY_PATIENT,
|
||||
DASHBOARD,
|
||||
CHATS
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard;
|
||||
package com.ssb.simplitend.patient_dashboard;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.os.Bundle;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
|
||||
public class DashBoardActivityCP extends AppCompatActivity {
|
||||
public class DashBoardActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats;
|
||||
package com.ssb.simplitend.patient_dashboard.chats;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -12,10 +12,10 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.Author;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.Message;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.Receiver;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.Author;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.Receiver;
|
||||
import com.ssb.simplitend.databinding.ChatFragmentBinding;
|
||||
import com.stfalcon.chatkit.messages.MessagesListAdapter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats;
|
||||
package com.ssb.simplitend.patient_dashboard.chats;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
@@ -8,7 +8,7 @@ import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.databinding.ChatCardViewholderBinding;
|
||||
|
||||
public class ChatListAdapter extends ListAdapter<ChatItem, ChatListAdapter.ChatCardViewHolder> {
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats;
|
||||
package com.ssb.simplitend.patient_dashboard.chats;
|
||||
|
||||
import static com.ssb.simplitend.careperson_dashboard.chats.ChatFragment.CHAT_ITEM_KEY;
|
||||
import static com.ssb.simplitend.patient_dashboard.chats.ChatFragment.CHAT_ITEM_KEY;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -16,8 +16,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.mvvm.ChatListViewModel;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.ChatItem;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.mvvm.ChatListViewModel;
|
||||
import com.ssb.simplitend.databinding.ChatListFragmentBinding;
|
||||
|
||||
public class ChatListFragment extends Fragment implements ChatListAdapter.OnChatItemClickListener {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats.mvvm;
|
||||
package com.ssb.simplitend.patient_dashboard.chats.mvvm;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats.mvvm;
|
||||
package com.ssb.simplitend.patient_dashboard.chats.mvvm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats.mvvm;
|
||||
package com.ssb.simplitend.patient_dashboard.chats.mvvm;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.ssb.simplitend.careperson_dashboard.chats.ChatListAdapter;
|
||||
import com.ssb.simplitend.patient_dashboard.chats.ChatListAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats.mvvm;
|
||||
package com.ssb.simplitend.patient_dashboard.chats.mvvm;
|
||||
|
||||
import com.stfalcon.chatkit.commons.models.IMessage;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.chats.mvvm;
|
||||
package com.ssb.simplitend.patient_dashboard.chats.mvvm;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.careperson_dashboard.fragments;
|
||||
package com.ssb.simplitend.patient_dashboard.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -16,7 +16,7 @@ import androidx.navigation.Navigation;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.careperson_dashboard.DashBoardActivityCP;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.databinding.ProfileProgressFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
@@ -102,7 +102,7 @@ public class ProfileProgressFragment extends Fragment implements ProfileContract
|
||||
);
|
||||
|
||||
binding.skipToDashboard.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(requireActivity(), DashBoardActivityCP.class);
|
||||
Intent intent = new Intent(requireActivity(), DashBoardActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
|
||||
@@ -18,7 +18,7 @@ import androidx.navigation.Navigation;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.careperson_dashboard.DashBoardActivityCP;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.databinding.SignInFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
@@ -138,7 +138,7 @@ public class SignInFragment extends Fragment implements WelcomeContracts.Registe
|
||||
|
||||
Toast.makeText(requireContext(), "Log in successful.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Intent intent = new Intent(requireActivity(), DashBoardActivityCP.class);
|
||||
Intent intent = new Intent(requireActivity(), DashBoardActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
|
||||
BIN
app/src/main/res/drawable/ic_articles.png
Normal file
BIN
app/src/main/res/drawable/ic_articles.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable/ic_chats_outline.png
Normal file
BIN
app/src/main/res/drawable/ic_chats_outline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
16
app/src/main/res/drawable/ic_close_roud_outline.xml
Normal file
16
app/src/main/res/drawable/ic_close_roud_outline.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25.5dp"
|
||||
android:height="25.5dp"
|
||||
android:viewportWidth="25.5"
|
||||
android:viewportHeight="25.5">
|
||||
<path
|
||||
android:pathData="M12.75,0.25A12.5,12.5 0,0 0,3.912 21.588,12.5 12.5,0 1,0 21.588,3.912 12.413,12.413 0,0 0,12.75 0.25ZM21.036,21.036A11.718,11.718 0,1 1,4.464 4.464,11.718 11.718,0 1,1 21.036,21.036Z"
|
||||
android:strokeWidth="0.5"
|
||||
android:fillColor="#fff"
|
||||
android:strokeColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M17.446,8.054a0.391,0.391 0,0 0,-0.552 0L12.75,12.197 8.607,8.054a0.391,0.391 0,0 0,-0.552 0.552L12.197,12.75 8.055,16.897a0.391,0.391 0,0 0,0.553 0.552l4.142,-4.144L16.897,17.446a0.391,0.391 0,0 0,0.553 -0.552l-4.144,-4.144 4.143,-4.144A0.389,0.389 0,0 0,17.446 8.054Z"
|
||||
android:strokeWidth="0.5"
|
||||
android:fillColor="#fff"
|
||||
android:strokeColor="#fff"/>
|
||||
</vector>
|
||||
BIN
app/src/main/res/drawable/ic_contact_us.png
Normal file
BIN
app/src/main/res/drawable/ic_contact_us.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/drawable/ic_dash_outline.png
Normal file
BIN
app/src/main/res/drawable/ic_dash_outline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable/ic_faqs.png
Normal file
BIN
app/src/main/res/drawable/ic_faqs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
5
app/src/main/res/drawable/ic_menu.xml
Normal file
5
app/src/main/res/drawable/ic_menu.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_next.xml
Normal file
5
app/src/main/res/drawable/ic_next.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="#000000" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||
</vector>
|
||||
BIN
app/src/main/res/drawable/ic_settings.png
Normal file
BIN
app/src/main/res/drawable/ic_settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -3,25 +3,25 @@
|
||||
android:height="21dp"
|
||||
android:viewportWidth="21"
|
||||
android:viewportHeight="21">
|
||||
<path
|
||||
android:pathData="M10.613,11.021a0.906,0.906 0,0 0,-0.226 0,3.088 3.088,0 1,1 0.226,0Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M17.062,18.034a9.9,9.9 0,0 1,-13.08 0A3.461,3.461 0,0 1,5.699 15.605a9.692,9.692 0,0 1,9.645 0A3.461,3.461 0,0 1,17.062 18.034Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M10.5,20.5A10,10 0,1 0,0.5 10.5,10 10,0 0,0 10.5,20.5Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M10.613,11.021a0.906,0.906 0,0 0,-0.226 0,3.088 3.088,0 1,1 0.226,0Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M17.062,18.034a9.9,9.9 0,0 1,-13.08 0A3.461,3.461 0,0 1,5.699 15.605a9.692,9.692 0,0 1,9.645 0A3.461,3.461 0,0 1,17.062 18.034Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M10.5,20.5A10,10 0,1 0,0.5 10.5,10 10,0 0,0 10.5,20.5Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#5b5b5b"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</vector>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white_bg"
|
||||
tools:context=".careperson_dashboard.DashBoardActivityCP">
|
||||
tools:context=".patient_dashboard.DashBoardActivity">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragmentContainerView"
|
||||
|
||||
7
app/src/main/res/layout/caregiver_chats_fragment.xml
Normal file
7
app/src/main/res/layout/caregiver_chats_fragment.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
</RelativeLayout>
|
||||
26
app/src/main/res/layout/caregiver_dash_fragment.xml
Normal file
26
app/src/main/res/layout/caregiver_dash_fragment.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"
|
||||
app:srcCompat="@drawable/ic_cg_dash_bg"
|
||||
android:contentDescription="@string/background"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,37 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fcv_cg_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
|
||||
android:weightSum="10"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:layout_weight="3"
|
||||
|
||||
android:src="@drawable/ic_cg_dash_bg"
|
||||
|
||||
android:scaleType="fitXY"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
android:src="@color/color_accent"
|
||||
android:layout_marginBottom="@dimen/bottom_nav_base_height"
|
||||
/>
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
@@ -39,24 +22,31 @@
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:title="Welcome Aditya"
|
||||
|
||||
/>
|
||||
|
||||
<com.ssb.simplitend.customsviews.HomeBottomNav
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<!-- Tint to listen click events when the menu is open-->
|
||||
<View
|
||||
android:id="@+id/tint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:text="Animate"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,20 +1,350 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_primary"
|
||||
>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10"
|
||||
android:background="@color/cg_dash_bg">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="7">
|
||||
|
||||
android:text="Aditya"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/_20sdp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:contentDescription="@string/close"
|
||||
|
||||
</RelativeLayout>
|
||||
android:src="@drawable/ic_close_roud_outline"
|
||||
|
||||
android:layout_marginVertical="@dimen/_20sdp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:src="@drawable/static_3"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="10"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
|
||||
android:padding="10dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:background="@drawable/round_corners"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="7"
|
||||
|
||||
android:text="@string/aditya_gaikwad"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
|
||||
android:background="@color/black"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="10"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
|
||||
android:padding="10dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:background="@drawable/round_corners"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_articles"
|
||||
app:tint="@color/white"
|
||||
|
||||
android:scaleType="fitStart"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
android:text="@string/articles"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="10"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
|
||||
android:padding="10dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:background="@drawable/round_corners"
|
||||
|
||||
android:baselineAligned="true"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_faqs"
|
||||
app:tint="@color/white"
|
||||
|
||||
android:scaleType="fitStart"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
android:text="@string/faqs"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="10"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
|
||||
android:padding="10dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:background="@drawable/round_corners"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_contact_us"
|
||||
app:tint="@color/white"
|
||||
|
||||
android:scaleType="fitStart"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
android:text="@string/contact_admin"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="10"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
|
||||
android:padding="10dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:background="@drawable/round_corners"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/white"
|
||||
|
||||
android:scaleType="fitStart"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
android:text="@string/settings"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/next"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -24,38 +24,47 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:weightSum="3"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="@dimen/bottom_nav_base_height"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:src="@drawable/ic_user_outline"
|
||||
android:contentDescription="@string/my_patient"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/patient_small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
android:text="@string/my_patient"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:contentDescription="@string/my_patient"
|
||||
android:src="@drawable/ic_user_outline" />
|
||||
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/my_patient"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -63,34 +72,42 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:visibility="gone"
|
||||
|
||||
android:src="@drawable/ic_user_outline"
|
||||
android:contentDescription="@string/my_patient"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/dash_small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
android:text="@string/my_patient"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:contentDescription="@string/dashboard"
|
||||
android:src="@drawable/ic_dash_outline"
|
||||
|
||||
android:visibility="gone"
|
||||
app:tint="@color/black"
|
||||
|
||||
/>
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/dashboard"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -98,30 +115,42 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:src="@drawable/ic_user_outline"
|
||||
android:contentDescription="@string/my_patient"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/chats_small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
android:text="@string/my_patient"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_11ssp"
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:contentDescription="@string/chat"
|
||||
android:src="@drawable/ic_chats_outline"
|
||||
|
||||
/>
|
||||
app:tint="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="5sp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/chat"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_11ssp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -138,6 +167,7 @@
|
||||
android:layout_alignParentTop="true"
|
||||
|
||||
android:layout_marginBottom="@dimen/_30sdp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
@@ -149,102 +179,68 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/patient_big"
|
||||
android:visibility="gone"
|
||||
android:layout_centerInParent="true"
|
||||
app:cardBackgroundColor="@color/color_primary"
|
||||
|
||||
app:cardCornerRadius="@dimen/_25sdp"
|
||||
|
||||
app:cardElevation="15dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
|
||||
android:src="@drawable/ic_user_outline"
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:visibility="visible"
|
||||
|
||||
app:cardBackgroundColor="@color/color_primary"
|
||||
|
||||
app:cardCornerRadius="@dimen/_35sdp"
|
||||
app:cardElevation="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
android:src="@drawable/ic_user_outline"
|
||||
|
||||
app:tint="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:visibility="gone"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
android:contentDescription="@string/my_patient"
|
||||
|
||||
app:backgroundTint="@color/cg_dash_bg"
|
||||
app:maxImageSize="@dimen/_25sdp"
|
||||
app:tint="@color/white"
|
||||
app:srcCompat="@drawable/ic_user_outline"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/dadh_big"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
app:cardBackgroundColor="@color/color_primary"
|
||||
android:contentDescription="@string/dashboard"
|
||||
|
||||
app:cardCornerRadius="@dimen/_25sdp"
|
||||
app:backgroundTint="@color/cg_dash_bg"
|
||||
app:maxImageSize="@dimen/_25sdp"
|
||||
app:tint="@color/white"
|
||||
app:srcCompat="@drawable/ic_dash_outline"
|
||||
/>
|
||||
|
||||
app:cardElevation="15dp"
|
||||
>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
android:layout_margin="15dp"
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/chat_big"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:src="@drawable/ic_user_outline"
|
||||
app:tint="@color/white"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
/>
|
||||
android:contentDescription="@string/chat"
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
app:backgroundTint="@color/cg_dash_bg"
|
||||
app:maxImageSize="@dimen/_25sdp"
|
||||
app:tint="@color/white"
|
||||
app:srcCompat="@drawable/ic_chats_outline"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
26
app/src/main/res/layout/my_patient_fragment.xml
Normal file
26
app/src/main/res/layout/my_patient_fragment.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"
|
||||
android:src="@color/color_primary"
|
||||
android:contentDescription="@string/background"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<fragment
|
||||
android:id="@+id/CPDashboardFragment"
|
||||
android:name="com.ssb.simplitend.careperson_dashboard.fragments.PatientDashboardFragment"
|
||||
android:name="com.ssb.simplitend.patient_dashboard.fragments.PatientDashboardFragment"
|
||||
android:label="CPDashboardFragment" >
|
||||
<action
|
||||
android:id="@+id/action_CPDashboardFragment_to_chatListFragment"
|
||||
@@ -14,7 +14,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chatListFragment"
|
||||
android:name="com.ssb.simplitend.careperson_dashboard.chats.ChatListFragment"
|
||||
android:name="com.ssb.simplitend.patient_dashboard.chats.ChatListFragment"
|
||||
android:label="ChatListFragment" >
|
||||
<action
|
||||
android:id="@+id/action_chatListFragment_to_chatFragment"
|
||||
@@ -22,6 +22,6 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chatFragment"
|
||||
android:name="com.ssb.simplitend.careperson_dashboard.chats.ChatFragment"
|
||||
android:name="com.ssb.simplitend.patient_dashboard.chats.ChatFragment"
|
||||
android:label="ChatFragment" />
|
||||
</navigation>
|
||||
@@ -10,7 +10,7 @@
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/color_primary</item>
|
||||
<item name="android:statusBarColor">@color/cg_dash_bg</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textCursorDrawable">@drawable/primary_cursor_drawable</item>
|
||||
|
||||
@@ -12,4 +12,6 @@
|
||||
<color name="color_primary">#1B6DC1</color>
|
||||
<color name="color_accent">#C9E0FB</color>
|
||||
|
||||
<color name="cg_dash_bg">#005F9A</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="drawer_drag_margin">16dp</dimen>
|
||||
<dimen name="bottom_nav_base_height">75dp</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -236,5 +236,11 @@
|
||||
<string name="at">at</string>
|
||||
<string name="caring_for_loved_one">Caring for a loved one may be\noverwhelming....\nLet our app assist you!</string>
|
||||
<string name="my_patient">My Patient</string>
|
||||
<string name="dashboard">Dashboard</string>
|
||||
<string name="chat">Chat</string>
|
||||
<string name="articles">Articles</string>
|
||||
<string name="faqs">FAQs</string>
|
||||
<string name="contact_admin">Contact admin</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
||||
</resources>
|
||||
@@ -10,7 +10,7 @@
|
||||
<item name="colorSecondaryVariant">@color/color_accent</item>
|
||||
<item name="colorOnSecondary">@color/color_accent</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/color_primary</item>
|
||||
<item name="android:statusBarColor">@color/cg_dash_bg</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:textCursorDrawable">@drawable/primary_cursor_drawable</item>
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
|
||||
Reference in New Issue
Block a user