fixed some bugs

added rate control to the changecolor event (much smoother now)
extraced some more string from the code, more is to come
This commit is contained in:
Giovanni Harting
2015-09-16 15:21:50 +02:00
parent 42ff424622
commit 9fa55d2994
5 changed files with 106 additions and 49 deletions

View File

@@ -356,14 +356,20 @@ public class AddStripeDialog extends DialogFragment implements DialogInterface.O
public void onResume() {
super.onResume();
ColorApplication.getInstance().onResume();
if (daemonArrayAdapter != null) {
daemonArrayAdapter.clear();
daemonArrayAdapter.addAll(ColorApplication.getInstance().getDaemons());
}
if (controllerArrayAdapter != null && mDaemonSelected) {
refreshController((LedDDaemon) daemonSpinner.getSelectedItem());
}
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
if (daemonArrayAdapter != null) {
daemonArrayAdapter.clear();
daemonArrayAdapter.addAll(ColorApplication.getInstance().getDaemons());
}
if (controllerArrayAdapter != null && mDaemonSelected) {
refreshController((LedDDaemon) daemonSpinner.getSelectedItem());
}
}
});
}
private void testChannel(EditText text, ImageButton button) {