ProfileViewerDialog -> kotlin
This commit is contained in:
parent
9608f5185f
commit
c1a1cc3108
8 changed files with 550 additions and 571 deletions
|
@ -4,7 +4,6 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Button
|
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus
|
import info.nightscout.androidaps.plugins.bus.RxBus
|
||||||
|
|
|
@ -633,8 +633,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
newDialog.setOptions(profileswitch, R.string.careportal_profileswitch);
|
newDialog.setOptions(profileswitch, R.string.careportal_profileswitch);
|
||||||
newDialog.show(getFragmentManager(), "NewNSTreatmentDialog");
|
newDialog.show(getFragmentManager(), "NewNSTreatmentDialog");
|
||||||
} else if (item.getTitle().equals(MainApp.gs(R.string.danar_viewprofile))) {
|
} else if (item.getTitle().equals(MainApp.gs(R.string.danar_viewprofile))) {
|
||||||
ProfileViewerDialog pvd = ProfileViewerDialog.newInstance(System.currentTimeMillis());
|
Bundle args = new Bundle();
|
||||||
|
args.putLong("time", DateUtil.now());
|
||||||
|
ProfileViewerDialog pvd = new ProfileViewerDialog();
|
||||||
|
pvd.setArguments(args);
|
||||||
FragmentManager manager = getFragmentManager();
|
FragmentManager manager = getFragmentManager();
|
||||||
|
if (manager != null)
|
||||||
pvd.show(manager, "ProfileViewDialog");
|
pvd.show(manager, "ProfileViewDialog");
|
||||||
} else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) {
|
} else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) {
|
||||||
DefaultValueHelper defHelper = new DefaultValueHelper();
|
DefaultValueHelper defHelper = new DefaultValueHelper();
|
||||||
|
|
|
@ -1,135 +0,0 @@
|
||||||
package info.nightscout.androidaps.plugins.treatments.fragments;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import androidx.fragment.app.DialogFragment;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
|
||||||
import butterknife.ButterKnife;
|
|
||||||
import butterknife.Unbinder;
|
|
||||||
import info.nightscout.androidaps.R;
|
|
||||||
import info.nightscout.androidaps.data.Profile;
|
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by adrian on 17/08/17.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ProfileViewerDialog extends DialogFragment {
|
|
||||||
|
|
||||||
private long time;
|
|
||||||
|
|
||||||
@BindView(R.id.profileview_noprofile)
|
|
||||||
TextView noProfile;
|
|
||||||
@BindView(R.id.profileview_invalidprofile)
|
|
||||||
TextView invalidProfile;
|
|
||||||
@BindView(R.id.profileview_units)
|
|
||||||
TextView units;
|
|
||||||
@BindView(R.id.profileview_dia)
|
|
||||||
TextView dia;
|
|
||||||
@BindView(R.id.profileview_activeprofile)
|
|
||||||
TextView activeProfile;
|
|
||||||
@BindView(R.id.profileview_ic)
|
|
||||||
TextView ic;
|
|
||||||
@BindView(R.id.profileview_isf)
|
|
||||||
TextView isf;
|
|
||||||
@BindView(R.id.profileview_basal)
|
|
||||||
TextView basal;
|
|
||||||
@BindView(R.id.profileview_target)
|
|
||||||
TextView target;
|
|
||||||
@BindView(R.id.profileview_datedelimiter)
|
|
||||||
View dateDelimiter;
|
|
||||||
@BindView(R.id.profileview_datelayout)
|
|
||||||
LinearLayout dateLayout;
|
|
||||||
@BindView(R.id.profileview_date)
|
|
||||||
TextView dateTextView;
|
|
||||||
@BindView(R.id.profileview_reload)
|
|
||||||
Button refreshButton;
|
|
||||||
@BindView(R.id.basal_graph)
|
|
||||||
ProfileGraph basalGraph;
|
|
||||||
|
|
||||||
private Unbinder unbinder;
|
|
||||||
|
|
||||||
public static ProfileViewerDialog newInstance(long time) {
|
|
||||||
ProfileViewerDialog dialog = new ProfileViewerDialog();
|
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
args.putLong("time", time);
|
|
||||||
dialog.setArguments(args);
|
|
||||||
|
|
||||||
return dialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
time = getArguments().getLong("time");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
super.onDestroyView();
|
|
||||||
if (unbinder != null)
|
|
||||||
unbinder.unbind();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
||||||
Bundle savedInstanceState) {
|
|
||||||
View view = inflater.inflate(R.layout.profileviewer_fragment, container, false);
|
|
||||||
|
|
||||||
unbinder = ButterKnife.bind(this, view);
|
|
||||||
|
|
||||||
refreshButton.setVisibility(View.GONE);
|
|
||||||
dateDelimiter.setVisibility(View.VISIBLE);
|
|
||||||
dateLayout.setVisibility(View.VISIBLE);
|
|
||||||
|
|
||||||
setContent();
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
ViewGroup.LayoutParams params = getDialog().getWindow().getAttributes();
|
|
||||||
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
||||||
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
||||||
getDialog().getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);
|
|
||||||
super.onResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setContent() {
|
|
||||||
Profile profile = null;
|
|
||||||
ProfileSwitch profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(time);
|
|
||||||
if (profileSwitch != null && profileSwitch.profileJson != null) {
|
|
||||||
profile = profileSwitch.getProfileObject();
|
|
||||||
}
|
|
||||||
if (profile != null) {
|
|
||||||
noProfile.setVisibility(View.GONE);
|
|
||||||
units.setText(profile.getUnits());
|
|
||||||
dia.setText(DecimalFormatter.to2Decimal(profile.getDia()) + " h");
|
|
||||||
activeProfile.setText(profileSwitch.getCustomizedName());
|
|
||||||
dateTextView.setText(DateUtil.dateAndTimeString(profileSwitch.date));
|
|
||||||
ic.setText(profile.getIcList());
|
|
||||||
isf.setText(profile.getIsfList());
|
|
||||||
basal.setText(profile.getBasalList());
|
|
||||||
target.setText(profile.getTargetList());
|
|
||||||
basalGraph.show(profile);
|
|
||||||
|
|
||||||
if (profile.isValid("ProfileViewDialog"))
|
|
||||||
invalidProfile.setVisibility(View.GONE);
|
|
||||||
else
|
|
||||||
invalidProfile.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
noProfile.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package info.nightscout.androidaps.plugins.treatments.fragments
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import info.nightscout.androidaps.MainApp
|
||||||
|
import info.nightscout.androidaps.R
|
||||||
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
|
||||||
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
|
import kotlinx.android.synthetic.main.close.*
|
||||||
|
import kotlinx.android.synthetic.main.profileviewer_fragment.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by adrian on 17/08/17.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ProfileViewerDialog : DialogFragment() {
|
||||||
|
private var time: Long = 0
|
||||||
|
|
||||||
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?): View? {
|
||||||
|
// load data from bundle
|
||||||
|
(savedInstanceState ?: arguments)?.let { bundle ->
|
||||||
|
time = bundle.getLong("time", 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return inflater.inflate(R.layout.profileviewer_fragment, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
close.setOnClickListener { dismiss() }
|
||||||
|
|
||||||
|
profileview_reload.visibility = View.GONE
|
||||||
|
profileview_datedelimiter.visibility = View.VISIBLE
|
||||||
|
profileview_datelayout.visibility = View.VISIBLE
|
||||||
|
profileview_noprofile.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
val profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(time)
|
||||||
|
profileSwitch?.profileObject?.let {
|
||||||
|
profileview_units.text = it.units
|
||||||
|
profileview_dia.text = MainApp.gs(R.string.format_hours, it.dia)
|
||||||
|
profileview_activeprofile.text = profileSwitch.customizedName
|
||||||
|
profileview_date.text = DateUtil.dateAndTimeString(profileSwitch.date)
|
||||||
|
profileview_ic.text = it.icList
|
||||||
|
profileview_isf.text = it.isfList
|
||||||
|
profileview_basal.text = it.basalList
|
||||||
|
profileview_target.text = it.targetList
|
||||||
|
basal_graph.show(it)
|
||||||
|
|
||||||
|
profileview_noprofile.visibility = View.GONE
|
||||||
|
profileview_invalidprofile.visibility = if (it.isValid("ProfileViewDialog")) View.GONE else View.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
dialog.window?.let {
|
||||||
|
val params = it.attributes
|
||||||
|
params.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
|
params.height = ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
|
it.attributes = params
|
||||||
|
}
|
||||||
|
super.onResume()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSaveInstanceState(bundle: Bundle) {
|
||||||
|
super.onSaveInstanceState(bundle)
|
||||||
|
bundle.putLong("time", time)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -159,9 +159,12 @@ public class TreatmentsProfileSwitchFragment extends SubscriberFragment implemen
|
||||||
break;
|
break;
|
||||||
case R.id.profileswitch_date:
|
case R.id.profileswitch_date:
|
||||||
case R.id.profileswitch_name:
|
case R.id.profileswitch_name:
|
||||||
long time = ((ProfileSwitch) v.getTag()).date;
|
Bundle args = new Bundle();
|
||||||
ProfileViewerDialog pvd = ProfileViewerDialog.newInstance(time);
|
args.putLong("time", ((ProfileSwitch) v.getTag()).date);
|
||||||
|
ProfileViewerDialog pvd = new ProfileViewerDialog();
|
||||||
|
pvd.setArguments(args);
|
||||||
FragmentManager manager = getFragmentManager();
|
FragmentManager manager = getFragmentManager();
|
||||||
|
if (manager != null)
|
||||||
pvd.show(manager, "ProfileViewDialog");
|
pvd.show(manager, "ProfileViewDialog");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
34
app/src/main/res/layout/close.xml
Normal file
34
app/src/main/res/layout/close.xml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/done_background"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:gravity="end|right"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/close"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
style="@style/mdtp_ActionButton.Text"
|
||||||
|
android:text="@string/close_navigation" />
|
||||||
|
</LinearLayout>
|
|
@ -1,13 +1,9 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.profile.ns.NSProfileFragment">
|
tools:context=".plugins.profile.ns.NSProfileFragment">
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -43,9 +39,9 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
|
||||||
android:text="@string/careportal_newnstreatment_profile_label"
|
android:text="@string/careportal_newnstreatment_profile_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -54,8 +50,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -65,7 +61,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -75,10 +71,10 @@
|
||||||
android:id="@+id/profileview_datedelimiter"
|
android:id="@+id/profileview_datedelimiter"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter"
|
android:background="@color/listdelimiter"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
@ -94,7 +90,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/date"
|
android:text="@string/date"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -103,8 +99,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -114,7 +110,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -123,10 +119,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -139,7 +135,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_units_label"
|
android:text="@string/nsprofileview_units_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -148,8 +144,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -159,7 +155,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -168,10 +164,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -184,7 +180,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_dia_label"
|
android:text="@string/nsprofileview_dia_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -193,8 +189,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -204,7 +200,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -213,10 +209,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -229,7 +225,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_ic_label"
|
android:text="@string/nsprofileview_ic_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -238,8 +234,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -249,7 +245,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -258,10 +254,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -274,7 +270,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_isf_label"
|
android:text="@string/nsprofileview_isf_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -283,8 +279,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -294,7 +290,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -303,10 +299,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -319,7 +315,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_basal_label"
|
android:text="@string/nsprofileview_basal_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -328,8 +324,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -339,7 +335,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -355,7 +351,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -364,8 +360,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -375,7 +371,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="17dp"
|
android:layout_marginStart="17dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -390,10 +386,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -406,7 +402,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:paddingRight="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:text="@string/nsprofileview_target_label"
|
android:text="@string/nsprofileview_target_label"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -415,8 +411,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:paddingEnd="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:paddingStart="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:text=":"
|
android:text=":"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -426,7 +422,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:paddingLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
@ -435,10 +431,10 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -448,7 +444,9 @@
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:text="@string/reloadprofile"
|
android:text="@string/reloadprofile"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</FrameLayout>
|
<include layout="@layout/close" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
|
@ -172,6 +172,7 @@
|
||||||
<string name="openapsma_lastenact_label">Last enacted</string>
|
<string name="openapsma_lastenact_label">Last enacted</string>
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
|
<string name="close">Close</string>
|
||||||
<string name="noapsselected">NO APS SELECTED OR PROVIDED RESULT</string>
|
<string name="noapsselected">NO APS SELECTED OR PROVIDED RESULT</string>
|
||||||
<string name="safety">Safety</string>
|
<string name="safety">Safety</string>
|
||||||
<string name="openapsma_disabled">Plugin is disabled</string>
|
<string name="openapsma_disabled">Plugin is disabled</string>
|
||||||
|
@ -937,6 +938,7 @@
|
||||||
<string name="insight_incompatible">Incompatible</string>
|
<string name="insight_incompatible">Incompatible</string>
|
||||||
<string name="second">second</string>
|
<string name="second">second</string>
|
||||||
<string name="minute">minute</string>
|
<string name="minute">minute</string>
|
||||||
|
<string name="format_hours">%1$.2f h</string>
|
||||||
<string name="hour">hour</string>
|
<string name="hour">hour</string>
|
||||||
<string name="day">day</string>
|
<string name="day">day</string>
|
||||||
<string name="week">week</string>
|
<string name="week">week</string>
|
||||||
|
|
Loading…
Reference in a new issue