altosdroid: Skip updating hidden UI elements
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / TabAscent.java
index cb9fd5c8dfb27bd484cc8f80499065dcff93ec5f..c146c27746d274dbde683582fff5dc9ee56064fa 100644 (file)
@@ -29,7 +29,7 @@ import android.widget.ImageView;
 import android.widget.TextView;
 import android.location.Location;
 
-public class TabAscent extends Fragment implements AltosDroidTab {
+public class TabAscent extends AltosDroidTab {
        AltosDroid mAltosDroid;
 
        private TextView mHeightView;
@@ -85,7 +85,11 @@ public class TabAscent extends Fragment implements AltosDroidTab {
                mAltosDroid = null;
        }
 
-       public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
+       public String tab_name() {
+               return "ascent";
+       }
+
+       public void show(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
                if (state != null) {
                        mHeightView.setText(AltosDroid.number("%6.0f m", state.height()));
                        mMaxHeightView.setText(AltosDroid.number("%6.0f m", state.max_height()));