Showing
11 changed files
with
109 additions
and
72 deletions
| 1 | package com.sw.laryngoscope.FHIR.fragment; | 1 | package com.sw.laryngoscope.FHIR.fragment; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import android.app.FragmentTransaction; | ||
| 4 | import android.content.Context; | 5 | import android.content.Context; |
| 5 | import android.provider.Settings; | 6 | import android.provider.Settings; |
| 6 | import android.text.Editable; | 7 | import android.text.Editable; |
| ... | @@ -14,6 +15,8 @@ import android.view.inputmethod.InputMethodManager; | ... | @@ -14,6 +15,8 @@ import android.view.inputmethod.InputMethodManager; |
| 14 | import android.widget.RadioGroup; | 15 | import android.widget.RadioGroup; |
| 15 | import android.widget.TextView; | 16 | import android.widget.TextView; |
| 16 | 17 | ||
| 18 | +import androidx.fragment.app.Fragment; | ||
| 19 | + | ||
| 17 | import com.sw.laryngoscope.R; | 20 | import com.sw.laryngoscope.R; |
| 18 | import com.sw.laryngoscope.activity.BaseFragment; | 21 | import com.sw.laryngoscope.activity.BaseFragment; |
| 19 | import com.sw.laryngoscope.activity.CustomTimer; | 22 | import com.sw.laryngoscope.activity.CustomTimer; |
| ... | @@ -103,6 +106,9 @@ public class FhirSettingFragment extends BaseFragment<FgSettingFhirBinding> impl | ... | @@ -103,6 +106,9 @@ public class FhirSettingFragment extends BaseFragment<FgSettingFhirBinding> impl |
| 103 | @Override | 106 | @Override |
| 104 | public void onClick(View v) { | 107 | public void onClick(View v) { |
| 105 | switch (v.getId()) { | 108 | switch (v.getId()) { |
| 109 | + case R.id.txt_patient_list: | ||
| 110 | + | ||
| 111 | + break; | ||
| 106 | default: | 112 | default: |
| 107 | break; | 113 | break; |
| 108 | } | 114 | } |
| ... | @@ -111,6 +117,7 @@ public class FhirSettingFragment extends BaseFragment<FgSettingFhirBinding> impl | ... | @@ -111,6 +117,7 @@ public class FhirSettingFragment extends BaseFragment<FgSettingFhirBinding> impl |
| 111 | @Override | 117 | @Override |
| 112 | public void onCheckedChanged(RadioGroup radioGroup, int i) { | 118 | public void onCheckedChanged(RadioGroup radioGroup, int i) { |
| 113 | switch (radioGroup.getCheckedRadioButtonId()) { | 119 | switch (radioGroup.getCheckedRadioButtonId()) { |
| 120 | + | ||
| 114 | } | 121 | } |
| 115 | } | 122 | } |
| 116 | 123 | ... | ... |
| ... | @@ -2,22 +2,22 @@ package com.sw.laryngoscope.FHIR.fragment; | ... | @@ -2,22 +2,22 @@ package com.sw.laryngoscope.FHIR.fragment; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import android.content.Context; | 4 | import android.content.Context; |
| 5 | -import android.os.Bundle; | ||
| 6 | import android.view.LayoutInflater; | 5 | import android.view.LayoutInflater; |
| 7 | import android.view.View; | 6 | import android.view.View; |
| 8 | import android.view.ViewGroup; | 7 | import android.view.ViewGroup; |
| 9 | import android.widget.Toast; | 8 | import android.widget.Toast; |
| 10 | 9 | ||
| 11 | -import androidx.annotation.NonNull; | 10 | + |
| 12 | -import androidx.annotation.Nullable; | ||
| 13 | import androidx.appcompat.widget.Toolbar; | 11 | import androidx.appcompat.widget.Toolbar; |
| 14 | -import androidx.fragment.app.Fragment; | ||
| 15 | import androidx.lifecycle.Observer; | 12 | import androidx.lifecycle.Observer; |
| 16 | import androidx.lifecycle.ViewModelProvider; | 13 | import androidx.lifecycle.ViewModelProvider; |
| 14 | +import androidx.lifecycle.ViewModelStoreOwner; | ||
| 17 | import androidx.recyclerview.widget.LinearLayoutManager; | 15 | import androidx.recyclerview.widget.LinearLayoutManager; |
| 18 | 16 | ||
| 19 | import com.sw.laryngoscope.R; | 17 | import com.sw.laryngoscope.R; |
| 20 | import com.sw.laryngoscope.FHIR.adapter.SelectPatientsAdapter; | 18 | import com.sw.laryngoscope.FHIR.adapter.SelectPatientsAdapter; |
| 19 | +import com.sw.laryngoscope.activity.BaseFragment; | ||
| 20 | +import com.sw.laryngoscope.activity.HomeActivity; | ||
| 21 | import com.sw.laryngoscope.databinding.FgPatientFragmentBinding; | 21 | import com.sw.laryngoscope.databinding.FgPatientFragmentBinding; |
| 22 | import com.sw.laryngoscope.FHIR.model.PatientModel; | 22 | import com.sw.laryngoscope.FHIR.model.PatientModel; |
| 23 | import com.sw.laryngoscope.FHIR.viewModel.SharedViewModel; | 23 | import com.sw.laryngoscope.FHIR.viewModel.SharedViewModel; |
| ... | @@ -25,61 +25,53 @@ import com.sw.laryngoscope.FHIR.viewModel.SharedViewModel; | ... | @@ -25,61 +25,53 @@ import com.sw.laryngoscope.FHIR.viewModel.SharedViewModel; |
| 25 | import java.util.ArrayList; | 25 | import java.util.ArrayList; |
| 26 | import java.util.HashMap; | 26 | import java.util.HashMap; |
| 27 | 27 | ||
| 28 | -public class SelectPatientsFragment extends Fragment implements SelectPatientsAdapter.OnPatientClickListener{ | 28 | +public class SelectPatientsFragment extends BaseFragment<FgPatientFragmentBinding> implements SelectPatientsAdapter.OnPatientClickListener{ |
| 29 | private String practitionerID; | 29 | private String practitionerID; |
| 30 | private SelectPatientsFragment thisFrag; // a reference to this fragment | 30 | private SelectPatientsFragment thisFrag; // a reference to this fragment |
| 31 | -// private Toolbar toolbar; | ||
| 32 | private SharedViewModel sharedViewModel; | 31 | private SharedViewModel sharedViewModel; |
| 33 | -// private RecyclerView recyclerView; | ||
| 34 | private ArrayList<PatientModel> selectedPatients = new ArrayList<>(); | 32 | private ArrayList<PatientModel> selectedPatients = new ArrayList<>(); |
| 35 | -// private TextView title; | 33 | + private HomeActivity homeActivity; |
| 36 | -// private TextView loadingTextView; | ||
| 37 | -// private ImageButton backButton; | ||
| 38 | -// private ProgressBar loadingSpinner; | ||
| 39 | - | ||
| 40 | - private FgPatientFragmentBinding binding; | ||
| 41 | - | ||
| 42 | - /** | ||
| 43 | - * Constructor | ||
| 44 | - * @param practitionerID the Health Practitioner's ID | ||
| 45 | - */ | ||
| 46 | - public SelectPatientsFragment(String practitionerID) { | ||
| 47 | - this.practitionerID = practitionerID; | ||
| 48 | - } | ||
| 49 | 34 | ||
| 50 | @Override | 35 | @Override |
| 51 | - public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, | 36 | + protected FgPatientFragmentBinding getViewBinding(LayoutInflater inflater, ViewGroup container) { |
| 52 | - @Nullable Bundle savedInstanceState) { | 37 | + return FgPatientFragmentBinding.inflate(inflater,container,false); |
| 53 | - | ||
| 54 | - binding = FgPatientFragmentBinding.inflate(inflater, container, false); | ||
| 55 | - | ||
| 56 | - return binding.getRoot(); | ||
| 57 | } | 38 | } |
| 58 | 39 | ||
| 59 | - public void onViewCreatred(@NonNull View view,@Nullable Bundle savedInstanceState){ | 40 | + @Override |
| 60 | - | 41 | + protected void init() { |
| 61 | - sharedViewModel = new ViewModelProvider(requireActivity()).get(SharedViewModel.class); | 42 | +// sharedViewModel = new ViewModelProvider(new ViewModelStoreOwner(this)).get(SharedViewModel.class); |
| 62 | - | ||
| 63 | - // find all the graphical components | ||
| 64 | -// recyclerView = root.findViewById(R.id.select_patients_recycler_view); | ||
| 65 | -// backButton = root.findViewById(R.id.btn_back); | ||
| 66 | -// toolbar = root.findViewById(R.id.select_patients_toolbar); | ||
| 67 | -// title = toolbar.findViewById(R.id.toolbar_title); | ||
| 68 | -// loadingTextView = root.findViewById(R.id.select_patients_txt_loading); | ||
| 69 | -// loadingSpinner = root.findViewById(R.id.select_patients_progressBar); | ||
| 70 | - | ||
| 71 | binding.selectPatientsTxtLoading.setVisibility(View.VISIBLE); | 43 | binding.selectPatientsTxtLoading.setVisibility(View.VISIBLE); |
| 72 | binding.selectPatientsProgressBar.setVisibility(View.VISIBLE); | 44 | binding.selectPatientsProgressBar.setVisibility(View.VISIBLE); |
| 73 | 45 | ||
| 74 | - sharedViewModel.setPractitionerID(practitionerID); | 46 | +// sharedViewModel.setPractitionerID(practitionerID); |
| 75 | setUpToolBar(); | 47 | setUpToolBar(); |
| 76 | 48 | ||
| 77 | //update UI when there's new patient under Health Practitioner | 49 | //update UI when there's new patient under Health Practitioner |
| 78 | - sharedViewModel.getAllPatients().observe(getViewLifecycleOwner(),patientUpdatedObserver); | 50 | +// sharedViewModel.getAllPatients().observe(getActivity(),patientUpdatedObserver); |
| 79 | 51 | ||
| 80 | thisFrag = this; | 52 | thisFrag = this; |
| 81 | } | 53 | } |
| 82 | 54 | ||
| 55 | + @Override | ||
| 56 | + protected void setListener() { | ||
| 57 | + | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | +// public void onViewCreatred(@NonNull View view,@Nullable Bundle savedInstanceState){ | ||
| 61 | +// | ||
| 62 | +// | ||
| 63 | +// | ||
| 64 | +// // find all the graphical components | ||
| 65 | +//// recyclerView = root.findViewById(R.id.select_patients_recycler_view); | ||
| 66 | +//// backButton = root.findViewById(R.id.btn_back); | ||
| 67 | +//// toolbar = root.findViewById(R.id.select_patients_toolbar); | ||
| 68 | +//// title = toolbar.findViewById(R.id.toolbar_title); | ||
| 69 | +//// loadingTextView = root.findViewById(R.id.select_patients_txt_loading); | ||
| 70 | +//// loadingSpinner = root.findViewById(R.id.select_patients_progressBar); | ||
| 71 | +// | ||
| 72 | +// | ||
| 73 | +// } | ||
| 74 | + | ||
| 83 | /** | 75 | /** |
| 84 | * This observer observes for changes in patient list | 76 | * This observer observes for changes in patient list |
| 85 | * ( The list that contains all patients under Health Practitioner ) | 77 | * ( The list that contains all patients under Health Practitioner ) |
| ... | @@ -161,4 +153,13 @@ public class SelectPatientsFragment extends Fragment implements SelectPatientsAd | ... | @@ -161,4 +153,13 @@ public class SelectPatientsFragment extends Fragment implements SelectPatientsAd |
| 161 | binding.selectPatientsToolbar.toolbarTitle.setText(text); | 153 | binding.selectPatientsToolbar.toolbarTitle.setText(text); |
| 162 | } | 154 | } |
| 163 | 155 | ||
| 156 | + @Override | ||
| 157 | + public void backMainAct() { | ||
| 158 | + | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + @Override | ||
| 162 | + public boolean startEnable() { | ||
| 163 | + return false; | ||
| 164 | + } | ||
| 164 | } | 165 | } | ... | ... |
| 1 | package com.sw.laryngoscope.activity; | 1 | package com.sw.laryngoscope.activity; |
| 2 | 2 | ||
| 3 | -import android.app.Fragment; | ||
| 4 | import android.content.Context; | 3 | import android.content.Context; |
| 5 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 6 | import android.view.KeyEvent; | 5 | import android.view.KeyEvent; |
| ... | @@ -12,6 +11,10 @@ import android.view.ViewGroup; | ... | @@ -12,6 +11,10 @@ import android.view.ViewGroup; |
| 12 | import androidx.annotation.Nullable; | 11 | import androidx.annotation.Nullable; |
| 13 | import androidx.viewbinding.ViewBinding; | 12 | import androidx.viewbinding.ViewBinding; |
| 14 | 13 | ||
| 14 | +import androidx.annotation.Nullable; | ||
| 15 | +import androidx.fragment.app.Fragment; | ||
| 16 | +import androidx.viewbinding.ViewBinding; | ||
| 17 | + | ||
| 15 | 18 | ||
| 16 | public abstract class BaseFragment<VB extends ViewBinding> extends Fragment | 19 | public abstract class BaseFragment<VB extends ViewBinding> extends Fragment |
| 17 | implements HomeCallback { | 20 | implements HomeCallback { | ... | ... |
| ... | @@ -3,33 +3,23 @@ package com.sw.laryngoscope.activity; | ... | @@ -3,33 +3,23 @@ package com.sw.laryngoscope.activity; |
| 3 | 3 | ||
| 4 | import android.Manifest; | 4 | import android.Manifest; |
| 5 | import android.annotation.SuppressLint; | 5 | import android.annotation.SuppressLint; |
| 6 | -import android.app.FragmentManager; | ||
| 7 | import android.content.BroadcastReceiver; | 6 | import android.content.BroadcastReceiver; |
| 8 | import android.content.Context; | 7 | import android.content.Context; |
| 9 | import android.content.Intent; | 8 | import android.content.Intent; |
| 10 | import android.content.IntentFilter; | 9 | import android.content.IntentFilter; |
| 11 | -import android.content.res.Resources; | ||
| 12 | -import android.graphics.Bitmap; | ||
| 13 | -import android.graphics.Canvas; | ||
| 14 | -import android.graphics.Color; | ||
| 15 | -import android.graphics.Paint; | ||
| 16 | -import android.graphics.Rect; | ||
| 17 | import android.graphics.drawable.Drawable; | 10 | import android.graphics.drawable.Drawable; |
| 18 | import android.os.Bundle; | 11 | import android.os.Bundle; |
| 19 | import android.os.SystemClock; | 12 | import android.os.SystemClock; |
| 20 | import android.view.KeyEvent; | 13 | import android.view.KeyEvent; |
| 21 | import android.view.MotionEvent; | 14 | import android.view.MotionEvent; |
| 22 | import android.view.View; | 15 | import android.view.View; |
| 23 | -import android.widget.ImageView; | ||
| 24 | import android.widget.RadioButton; | 16 | import android.widget.RadioButton; |
| 25 | import android.widget.RadioGroup; | 17 | import android.widget.RadioGroup; |
| 26 | -import android.widget.TextView; | ||
| 27 | 18 | ||
| 28 | import androidx.annotation.NonNull; | 19 | import androidx.annotation.NonNull; |
| 29 | -import androidx.annotation.Nullable; | 20 | +import androidx.fragment.app.FragmentManager; |
| 30 | 21 | ||
| 31 | -import com.mobile.ffmpeg.util.FFmpegAsyncUtils; | 22 | +import com.sw.laryngoscope.FHIR.fragment.SelectPatientsFragment; |
| 32 | -import com.mobile.ffmpeg.util.FFmpegExecuteCallback; | ||
| 33 | import com.sw.laryngoscope.MyApplication; | 23 | import com.sw.laryngoscope.MyApplication; |
| 34 | import com.sw.laryngoscope.R; | 24 | import com.sw.laryngoscope.R; |
| 35 | import com.sw.laryngoscope.activity.fragment.archive.ArchiveFragment; | 25 | import com.sw.laryngoscope.activity.fragment.archive.ArchiveFragment; |
| ... | @@ -88,6 +78,8 @@ public class HomeActivity extends | ... | @@ -88,6 +78,8 @@ public class HomeActivity extends |
| 88 | public LoginFragment loginFragment; | 78 | public LoginFragment loginFragment; |
| 89 | public SettingFragment settingFragment; | 79 | public SettingFragment settingFragment; |
| 90 | 80 | ||
| 81 | + public SelectPatientsFragment patientsFragment; | ||
| 82 | + | ||
| 91 | private CustomTimer backLiveTimer; | 83 | private CustomTimer backLiveTimer; |
| 92 | private final String backLiveTAG = "backLiveTimer"; | 84 | private final String backLiveTAG = "backLiveTimer"; |
| 93 | 85 | ||
| ... | @@ -108,7 +100,7 @@ public class HomeActivity extends | ... | @@ -108,7 +100,7 @@ public class HomeActivity extends |
| 108 | protected void onCreate(Bundle savedInstanceState) { | 100 | protected void onCreate(Bundle savedInstanceState) { |
| 109 | super.onCreate(savedInstanceState); | 101 | super.onCreate(savedInstanceState); |
| 110 | context = getApplicationContext(); | 102 | context = getApplicationContext(); |
| 111 | - fragmentManager = getFragmentManager(); | 103 | + fragmentManager = getSupportFragmentManager(); |
| 112 | long beginTime = SystemClock.elapsedRealtime(); | 104 | long beginTime = SystemClock.elapsedRealtime(); |
| 113 | 105 | ||
| 114 | checkPermission(); | 106 | checkPermission(); |
| ... | @@ -325,6 +317,13 @@ public class HomeActivity extends | ... | @@ -325,6 +317,13 @@ public class HomeActivity extends |
| 325 | showSettingFragment(); | 317 | showSettingFragment(); |
| 326 | } | 318 | } |
| 327 | break; | 319 | break; |
| 320 | + | ||
| 321 | + case R.id.btn_patient: | ||
| 322 | + Logger.d(TAG, "======showFragment======btn_set"+binding.layoutHomeLeft.btnSet.isPressed()); | ||
| 323 | + if( binding.layoutHomeLeft.btnPatient.isPressed() ) { | ||
| 324 | + showPatientFragment(); | ||
| 325 | + } | ||
| 326 | + break; | ||
| 328 | } | 327 | } |
| 329 | } | 328 | } |
| 330 | if ( binding.layoutHomeLeftO.getRoot().getVisibility() == View.VISIBLE ) { | 329 | if ( binding.layoutHomeLeftO.getRoot().getVisibility() == View.VISIBLE ) { |
| ... | @@ -374,7 +373,7 @@ public class HomeActivity extends | ... | @@ -374,7 +373,7 @@ public class HomeActivity extends |
| 374 | private void init() { | 373 | private void init() { |
| 375 | if (homeFragment == null) { | 374 | if (homeFragment == null) { |
| 376 | homeFragment = new HomeFragment(); | 375 | homeFragment = new HomeFragment(); |
| 377 | - getFragmentManager().beginTransaction() | 376 | + fragmentManager.beginTransaction() |
| 378 | .add(R.id.home_fragment, homeFragment) | 377 | .add(R.id.home_fragment, homeFragment) |
| 379 | .show(homeFragment) | 378 | .show(homeFragment) |
| 380 | .commit(); | 379 | .commit(); |
| ... | @@ -416,7 +415,7 @@ public class HomeActivity extends | ... | @@ -416,7 +415,7 @@ public class HomeActivity extends |
| 416 | if (archiveFragment == null) { | 415 | if (archiveFragment == null) { |
| 417 | archiveFragment = new ArchiveFragment(); | 416 | archiveFragment = new ArchiveFragment(); |
| 418 | archiveFragment.setHomeActivity(this); | 417 | archiveFragment.setHomeActivity(this); |
| 419 | - getFragmentManager().beginTransaction() | 418 | + fragmentManager.beginTransaction() |
| 420 | .add(R.id.home_fragment, archiveFragment) | 419 | .add(R.id.home_fragment, archiveFragment) |
| 421 | .commit(); | 420 | .commit(); |
| 422 | } | 421 | } |
| ... | @@ -429,7 +428,7 @@ public class HomeActivity extends | ... | @@ -429,7 +428,7 @@ public class HomeActivity extends |
| 429 | if (loginFragment == null) { | 428 | if (loginFragment == null) { |
| 430 | loginFragment = new LoginFragment(); | 429 | loginFragment = new LoginFragment(); |
| 431 | loginFragment.setHomeActivity(this); | 430 | loginFragment.setHomeActivity(this); |
| 432 | - getFragmentManager().beginTransaction() | 431 | + fragmentManager.beginTransaction() |
| 433 | .add(R.id.home_fragment, loginFragment) | 432 | .add(R.id.home_fragment, loginFragment) |
| 434 | .commit(); | 433 | .commit(); |
| 435 | } | 434 | } |
| ... | @@ -445,7 +444,7 @@ public class HomeActivity extends | ... | @@ -445,7 +444,7 @@ public class HomeActivity extends |
| 445 | settingFragment.showSet(); | 444 | settingFragment.showSet(); |
| 446 | isBackToSetting = false; | 445 | isBackToSetting = false; |
| 447 | } | 446 | } |
| 448 | - getFragmentManager().beginTransaction() | 447 | + fragmentManager.beginTransaction() |
| 449 | .add(R.id.home_fragment, settingFragment) | 448 | .add(R.id.home_fragment, settingFragment) |
| 450 | .commit(); | 449 | .commit(); |
| 451 | } | 450 | } |
| ... | @@ -456,6 +455,18 @@ public class HomeActivity extends | ... | @@ -456,6 +455,18 @@ public class HomeActivity extends |
| 456 | showFragment(settingFragment); | 455 | showFragment(settingFragment); |
| 457 | } | 456 | } |
| 458 | 457 | ||
| 458 | + private void showPatientFragment() { | ||
| 459 | + binding.txtDeviceId.setVisibility(View.GONE); | ||
| 460 | + if (patientsFragment == null) { | ||
| 461 | + patientsFragment = new SelectPatientsFragment(); | ||
| 462 | + patientsFragment.setHomeActivity(this); | ||
| 463 | + fragmentManager.beginTransaction() | ||
| 464 | + .add(R.id.home_fragment, patientsFragment) | ||
| 465 | + .commit(); | ||
| 466 | + } | ||
| 467 | + showFragment(patientsFragment); | ||
| 468 | + } | ||
| 469 | + | ||
| 459 | public void showLeftO() { | 470 | public void showLeftO() { |
| 460 | //layout_home_left.setVisibility(View.VISIBLE); | 471 | //layout_home_left.setVisibility(View.VISIBLE); |
| 461 | //layout_home_left_o.setVisibility(View.GONE); | 472 | //layout_home_left_o.setVisibility(View.GONE); | ... | ... |
| 1 | package com.sw.laryngoscope.activity.fragment; | 1 | package com.sw.laryngoscope.activity.fragment; |
| 2 | 2 | ||
| 3 | -import android.app.FragmentManager; | ||
| 4 | import android.content.Context; | 3 | import android.content.Context; |
| 5 | import android.view.LayoutInflater; | 4 | import android.view.LayoutInflater; |
| 6 | import android.view.View; | 5 | import android.view.View; |
| 7 | import android.view.ViewGroup; | 6 | import android.view.ViewGroup; |
| 8 | -import android.widget.FrameLayout; | ||
| 9 | -import android.widget.RadioButton; | ||
| 10 | import android.widget.RadioGroup; | 7 | import android.widget.RadioGroup; |
| 11 | 8 | ||
| 9 | +import androidx.fragment.app.FragmentManager; | ||
| 10 | + | ||
| 12 | import com.sw.laryngoscope.FHIR.fragment.FhirSettingFragment; | 11 | import com.sw.laryngoscope.FHIR.fragment.FhirSettingFragment; |
| 13 | import com.sw.laryngoscope.R; | 12 | import com.sw.laryngoscope.R; |
| 14 | import com.sw.laryngoscope.activity.BaseFragment; | 13 | import com.sw.laryngoscope.activity.BaseFragment; | ... | ... |
| 1 | package com.sw.laryngoscope.activity.fragment.archive; | 1 | package com.sw.laryngoscope.activity.fragment.archive; |
| 2 | 2 | ||
| 3 | -import android.app.FragmentManager; | ||
| 4 | import android.content.Context; | 3 | import android.content.Context; |
| 5 | import android.os.Handler; | 4 | import android.os.Handler; |
| 6 | import android.view.KeyEvent; | 5 | import android.view.KeyEvent; |
| ... | @@ -17,6 +16,7 @@ import android.widget.PopupWindow; | ... | @@ -17,6 +16,7 @@ import android.widget.PopupWindow; |
| 17 | import android.widget.RelativeLayout; | 16 | import android.widget.RelativeLayout; |
| 18 | import android.widget.TextView; | 17 | import android.widget.TextView; |
| 19 | 18 | ||
| 19 | +import androidx.fragment.app.FragmentManager; | ||
| 20 | import androidx.recyclerview.widget.GridLayoutManager; | 20 | import androidx.recyclerview.widget.GridLayoutManager; |
| 21 | import androidx.recyclerview.widget.RecyclerView; | 21 | import androidx.recyclerview.widget.RecyclerView; |
| 22 | 22 | ... | ... |
| ... | @@ -6,11 +6,7 @@ import android.os.Environment; | ... | @@ -6,11 +6,7 @@ import android.os.Environment; |
| 6 | import android.view.LayoutInflater; | 6 | import android.view.LayoutInflater; |
| 7 | import android.view.View; | 7 | import android.view.View; |
| 8 | import android.view.ViewGroup; | 8 | import android.view.ViewGroup; |
| 9 | -import android.widget.LinearLayout; | ||
| 10 | -import android.widget.ListView; | ||
| 11 | -import android.widget.RadioButton; | ||
| 12 | import android.widget.RadioGroup; | 9 | import android.widget.RadioGroup; |
| 13 | -import android.widget.TextView; | ||
| 14 | import android.widget.Toast; | 10 | import android.widget.Toast; |
| 15 | 11 | ||
| 16 | import com.sw.laryngoscope.BuildConfig; | 12 | import com.sw.laryngoscope.BuildConfig; |
| ... | @@ -42,10 +38,8 @@ public class AboutFragment extends BaseFragment<FgSettingAbBinding> implements C | ... | @@ -42,10 +38,8 @@ public class AboutFragment extends BaseFragment<FgSettingAbBinding> implements C |
| 42 | 38 | ||
| 43 | private static final String TAG = "AboutFragment"; | 39 | private static final String TAG = "AboutFragment"; |
| 44 | private Context context; | 40 | private Context context; |
| 45 | - | ||
| 46 | private CustomTimer scrollTimer; | 41 | private CustomTimer scrollTimer; |
| 47 | private final String timerTAG_scroll = "scroll"; | 42 | private final String timerTAG_scroll = "scroll"; |
| 48 | - | ||
| 49 | private DeviceInfoItemAdapter mDeviceInfoItemAdapter; | 43 | private DeviceInfoItemAdapter mDeviceInfoItemAdapter; |
| 50 | private List<DeviceInfoBean> listInfoBean = new ArrayList<>(); | 44 | private List<DeviceInfoBean> listInfoBean = new ArrayList<>(); |
| 51 | 45 | ... | ... |
| ... | @@ -12,10 +12,8 @@ import android.view.LayoutInflater; | ... | @@ -12,10 +12,8 @@ import android.view.LayoutInflater; |
| 12 | import android.view.View; | 12 | import android.view.View; |
| 13 | import android.view.ViewGroup; | 13 | import android.view.ViewGroup; |
| 14 | import android.view.WindowManager; | 14 | import android.view.WindowManager; |
| 15 | -import android.widget.RelativeLayout; | ||
| 16 | import android.widget.ScrollView; | 15 | import android.widget.ScrollView; |
| 17 | import android.widget.SeekBar; | 16 | import android.widget.SeekBar; |
| 18 | -import android.widget.TextView; | ||
| 19 | import android.widget.Toast; | 17 | import android.widget.Toast; |
| 20 | 18 | ||
| 21 | import com.sw.laryngoscope.BuildConfig; | 19 | import com.sw.laryngoscope.BuildConfig; | ... | ... |
| ... | @@ -9,6 +9,7 @@ import android.view.Window; | ... | @@ -9,6 +9,7 @@ import android.view.Window; |
| 9 | import android.view.WindowManager; | 9 | import android.view.WindowManager; |
| 10 | 10 | ||
| 11 | import androidx.annotation.Nullable; | 11 | import androidx.annotation.Nullable; |
| 12 | +import androidx.appcompat.app.AppCompatActivity; | ||
| 12 | import androidx.viewbinding.ViewBinding; | 13 | import androidx.viewbinding.ViewBinding; |
| 13 | 14 | ||
| 14 | import com.sw.laryngoscope.base.factory.PresenterFactory; | 15 | import com.sw.laryngoscope.base.factory.PresenterFactory; |
| ... | @@ -27,7 +28,7 @@ import com.sw.laryngoscope.utils.Logger; | ... | @@ -27,7 +28,7 @@ import com.sw.laryngoscope.utils.Logger; |
| 27 | * @Time 2019/05/29 | 28 | * @Time 2019/05/29 |
| 28 | */ | 29 | */ |
| 29 | public abstract class BaseActivity<V extends BaseView, P extends BasePresenter<V>,VB extends ViewBinding> | 30 | public abstract class BaseActivity<V extends BaseView, P extends BasePresenter<V>,VB extends ViewBinding> |
| 30 | - extends Activity implements BaseView, PresenterProxy<V, P> { | 31 | + extends AppCompatActivity implements BaseView, PresenterProxy<V, P> { |
| 31 | 32 | ||
| 32 | public String TAG; | 33 | public String TAG; |
| 33 | private static final String PRESENTER_SAVE_KEY = "presenter_save_key"; | 34 | private static final String PRESENTER_SAVE_KEY = "presenter_save_key"; | ... | ... |
| ... | @@ -54,6 +54,15 @@ | ... | @@ -54,6 +54,15 @@ |
| 54 | android:drawableTop="@drawable/btn_menu_settings" | 54 | android:drawableTop="@drawable/btn_menu_settings" |
| 55 | android:background="@drawable/bg_real_time_display_select" | 55 | android:background="@drawable/bg_real_time_display_select" |
| 56 | android:button="@null" /> | 56 | android:button="@null" /> |
| 57 | + | ||
| 58 | + <com.sw.laryngoscope.widget.CenterRadioButton | ||
| 59 | + android:id="@+id/btn_patient" | ||
| 60 | + android:layout_width="match_parent" | ||
| 61 | + android:layout_height="@dimen/dp_y_120" | ||
| 62 | + android:layout_marginTop="@dimen/dp_y_neg_30" | ||
| 63 | + android:drawableTop="@drawable/btn_menu_settings" | ||
| 64 | + android:background="@drawable/bg_real_time_display_select" | ||
| 65 | + android:button="@null" /> | ||
| 57 | </RadioGroup> | 66 | </RadioGroup> |
| 58 | 67 | ||
| 59 | <TextView | 68 | <TextView | ... | ... |
| ... | @@ -78,6 +78,20 @@ | ... | @@ -78,6 +78,20 @@ |
| 78 | android:textColorHint="@color/color_d8d8d8" | 78 | android:textColorHint="@color/color_d8d8d8" |
| 79 | android:textSize="@dimen/text_size_24" /> | 79 | android:textSize="@dimen/text_size_24" /> |
| 80 | </RelativeLayout> | 80 | </RelativeLayout> |
| 81 | + | ||
| 82 | + <TextView | ||
| 83 | + android:id="@+id/txt_patient_list" | ||
| 84 | + android:layout_width="180dp" | ||
| 85 | + android:layout_height="50dp" | ||
| 86 | + android:layout_below="@+id/lay_1" | ||
| 87 | + android:layout_alignParentRight="true" | ||
| 88 | + android:layout_marginTop="50dp" | ||
| 89 | + android:layout_marginRight="30dp" | ||
| 90 | + android:background="@drawable/shape_txt_set_style_12_2" | ||
| 91 | + android:gravity="center" | ||
| 92 | + android:text="View Patient" | ||
| 93 | + android:textColor="@drawable/txt_click_color_1" | ||
| 94 | + android:textSize="@dimen/text_size_25" /> | ||
| 81 | </RelativeLayout> | 95 | </RelativeLayout> |
| 82 | 96 | ||
| 83 | </androidx.constraintlayout.widget.ConstraintLayout> | 97 | </androidx.constraintlayout.widget.ConstraintLayout> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment