mStateView = (TextView) findViewById(R.id.state_value);
mAgeView = (TextView) findViewById(R.id.age_value);
mAgeNewColor = mAgeView.getTextColors().getDefaultColor();
- mAgeOldColor = getResources().getColor(R.color.old_color);
+ mAgeOldColor = getResources().getColor(R.color.old_color, getTheme());
}
private void ensureBluetooth() {
import org.altusmetrum.altoslib_13.*;
import android.location.Location;
import android.app.Activity;
+import android.content.*;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import android.widget.TextView;
}
@Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
- altos_droid = (AltosDroid) activity;
+ public void onAttach(Context context) {
+ super.onAttach(context);
+ altos_droid = (AltosDroid) context;
altos_droid.registerTab(this);
}
draw_bitmap(here, here_bitmap, here_off_x, here_off_y);
}
- @Override public void invalidate() {
- Rect r = new Rect();
- getDrawingRect(r);
- super.invalidate();
- }
-
- @Override public void invalidate(int l, int t, int r, int b) {
- Rect rect = new Rect();
- getDrawingRect(rect);
- super.invalidate();
- }
-
@Override
protected void onDraw(Canvas view_canvas) {
if (map == null) {
if (!tts_enabled) return;
last_speak_time = now();
if (!quiet)
- tts.speak(s, TextToSpeech.QUEUE_ADD, null);
+ tts.speak(s, TextToSpeech.QUEUE_ADD, null, null);
}
public synchronized long time_since_speak() {
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.device_list);
// Set result CANCELED incase the user backs out
AltosDebug.debug("doDiscovery()");
// Indicate scanning in the title
- setProgressBarIndeterminateVisibility(true);
setTitle(R.string.scanning);
// Turn on sub-title for new devices
/* When discovery is finished, change the Activity title
*/
} else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
- setProgressBarIndeterminateVisibility(false);
setTitle(R.string.select_device);
if (mNewDevicesArrayAdapter.getCount() == 0) {
String noDevices = getResources().getText(R.string.none_found).toString();
missing = true;
set = false;
- dRed = r.getDrawable(R.drawable.redled);
- dGreen = r.getDrawable(R.drawable.greenled);
- dGray = r.getDrawable(R.drawable.grayled);
+ dRed = in_red.getContext().getDrawable(R.drawable.redled);
+ dGreen = in_red.getContext().getDrawable(R.drawable.greenled);
+ dGray = in_red.getContext().getDrawable(R.drawable.grayled);
}
public void set(Boolean s, Boolean m) {
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.idle_mode);
callsign = (EditText) findViewById(R.id.set_callsign);
if (position == selected_item)
item.igniter_view.setBackgroundColor(Color.RED);
else
- item.igniter_view.setBackgroundColor(Color.WHITE);
+ item.igniter_view.setBackgroundColor(0);
return item.igniter_view;
}
}
switch (msg.what) {
case AltosDroid.MSG_IGNITER_STATUS:
- ia.igniter_status((HashMap <String,Integer>) msg.obj);
+ @SuppressWarnings("unchecked") HashMap<String,Integer> map = (HashMap <String,Integer>) msg.obj;
+ ia.igniter_status(map);
break;
}
}
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.igniters);
igniters_view = (ListView) findViewById(R.id.igniters);
if (position == selected_item)
item.frequency_view.setBackgroundColor(Color.RED);
else
- item.frequency_view.setBackgroundColor(Color.BLACK);
+ item.frequency_view.setBackgroundColor(0);
return item.frequency_view;
}
}
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.manage_frequencies);
frequencies_view = (ListView) findViewById(R.id.frequencies);
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.map_type);
hybrid = (Button) findViewById(R.id.map_type_hybrid);
super.onCreate(savedInstanceState);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.map_preload);
// Set result CANCELED incase the user backs out
AltosDroidPreferences.init(this);
// Setup the window
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.setup);
select_rate = (Spinner) findViewById(R.id.select_rate);
private View view;
private int map_source;
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- }
-
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.tab_map, container, false);
mViewPager = pager;
mTabHost.setOnTabChangedListener(this);
mViewPager.setAdapter(this);
- mViewPager.setOnPageChangeListener(this);
+ mViewPager.addOnPageChangeListener(this);
}
public void addTab(TabHost.TabSpec tabSpec, Class<?> clss, Bundle args) {