UI crimes
This commit is contained in:
parent
8ecf6922f7
commit
8dd714b390
2 changed files with 11 additions and 5 deletions
|
@ -34,14 +34,14 @@ public class ComboFragment extends Fragment {
|
||||||
return comboPlugin;
|
return comboPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
private EditText statusText;
|
private TextView statusText;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.combopump_fragment, container, false);
|
View view = inflater.inflate(R.layout.combopump_fragment, container, false);
|
||||||
|
|
||||||
statusText = (EditText) view.findViewById(R.id.comboStatusEditText);
|
statusText = (TextView) view.findViewById(R.id.comboStatusEditText);
|
||||||
|
|
||||||
updateGUI();
|
updateGUI();
|
||||||
return view;
|
return view;
|
||||||
|
@ -64,6 +64,7 @@ public class ComboFragment extends Fragment {
|
||||||
updateGUI();
|
updateGUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO *very* quick hack
|
||||||
public void updateGUI() {
|
public void updateGUI() {
|
||||||
Activity activity = getActivity();
|
Activity activity = getActivity();
|
||||||
if (activity != null)
|
if (activity != null)
|
||||||
|
@ -77,7 +78,12 @@ public class ComboFragment extends Fragment {
|
||||||
sb.append(getPlugin().statusSummary);
|
sb.append(getPlugin().statusSummary);
|
||||||
if (getPlugin().pumpState != null) {
|
if (getPlugin().pumpState != null) {
|
||||||
sb.append("\n\n");
|
sb.append("\n\n");
|
||||||
sb.append(getPlugin().pumpState.toString().replaceAll(",", "\n"));
|
sb.append(getPlugin().pumpState.toString()
|
||||||
|
// i know ... i need to take a break already
|
||||||
|
.replaceAll(", ", "\n")
|
||||||
|
.replaceAll("PumpState\\{", "\n")
|
||||||
|
.replaceAll("\\}", "\n")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
statusText.setText(sb.toString());
|
statusText.setText(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
android:id="@+id/comboStatusEditText"
|
android:id="@+id/comboStatusEditText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:padding="10dp" />
|
||||||
android:layout_gravity="center_horizontal"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
Loading…
Reference in a new issue