Death to tabs! Long live spaces!
This commit is contained in:
parent
9285836e61
commit
00faa9ec76
@ -58,8 +58,7 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activities.ViewMapActivity"
|
||||
android:label="@string/system_map" >
|
||||
</activity>
|
||||
android:label="@string/system_map"></activity>
|
||||
|
||||
<service
|
||||
android:name=".services.BoardedDepartureService"
|
||||
|
@ -153,7 +153,9 @@ public class RoutesListActivity extends Activity implements TickSubscriber {
|
||||
refreshFares();
|
||||
}
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
/**
|
||||
* Called when the activity is first created.
|
||||
*/
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -296,7 +296,7 @@ public class ViewDeparturesActivity extends Activity implements
|
||||
* wants to board
|
||||
*/
|
||||
setBoardedDeparture(
|
||||
(Departure) getListAdapter().getItem(position), true);
|
||||
getListAdapter().getItem(position), true);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -306,7 +306,7 @@ public class ViewDeparturesActivity extends Activity implements
|
||||
public boolean onItemLongClick(AdapterView<?> adapterView, View view,
|
||||
int position, long id) {
|
||||
mWasLongClick = true;
|
||||
setSelectedDeparture((Departure) getListAdapter().getItem(position));
|
||||
setSelectedDeparture(getListAdapter().getItem(position));
|
||||
startDepartureActionMode();
|
||||
return false;
|
||||
}
|
||||
@ -472,7 +472,7 @@ public class ViewDeparturesActivity extends Activity implements
|
||||
startService(intent);
|
||||
|
||||
if (startActionMode) {
|
||||
((Checkable) mYourTrainSection).setChecked(true);
|
||||
mYourTrainSection.setChecked(true);
|
||||
startYourTrainActionMode();
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ package com.dougkeen.bart.controls;
|
||||
import static com.nineoldandroids.view.ViewHelper.setAlpha;
|
||||
import static com.nineoldandroids.view.ViewHelper.setTranslationX;
|
||||
import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
@ -40,7 +41,7 @@ import com.nineoldandroids.animation.ValueAnimator;
|
||||
* callback). Also, a {@link android.view.View.OnTouchListener} that makes any
|
||||
* {@link View} dismissable when the user swipes (drags her finger) horizontally
|
||||
* across the view.
|
||||
*
|
||||
* <p>
|
||||
* <p>
|
||||
* <em>For {@link android.widget.ListView} list items that don't manage their own touch events
|
||||
* (i.e. you're using
|
||||
@ -48,11 +49,11 @@ import com.nineoldandroids.animation.ValueAnimator;
|
||||
* or an equivalent listener on {@link android.app.ListActivity} or
|
||||
* {@link android.app.ListFragment}, use {@link SwipeDismissListViewTouchListener} instead.</em>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <p>
|
||||
* Example usage:
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <pre>
|
||||
* view.setOnTouchListener(new SwipeDismisser(view, null, // Optional
|
||||
* // token/cookie
|
||||
@ -94,10 +95,8 @@ public class SwipeHelper implements View.OnTouchListener {
|
||||
* Called when the user has indicated they she would like to dismiss the
|
||||
* view.
|
||||
*
|
||||
* @param view
|
||||
* The originating {@link View} to be dismissed.
|
||||
* @param token
|
||||
* The optional token passed to this object's constructor.
|
||||
* @param view The originating {@link View} to be dismissed.
|
||||
* @param token The optional token passed to this object's constructor.
|
||||
*/
|
||||
void onDismiss(View view, Object token);
|
||||
}
|
||||
@ -105,13 +104,10 @@ public class SwipeHelper implements View.OnTouchListener {
|
||||
/**
|
||||
* Constructs a new swipe-to-dismiss touch listener for the given view.
|
||||
*
|
||||
* @param view
|
||||
* The view to make dismissable.
|
||||
* @param token
|
||||
* An optional token/cookie object to be passed through to the
|
||||
* @param view The view to make dismissable.
|
||||
* @param token An optional token/cookie object to be passed through to the
|
||||
* callback.
|
||||
* @param callback
|
||||
* The callback to trigger when the user has indicated that she
|
||||
* @param callback The callback to trigger when the user has indicated that she
|
||||
* would like to dismiss this view.
|
||||
*/
|
||||
public SwipeHelper(View view, Object token, OnDismissCallback callback) {
|
||||
|
@ -7,7 +7,7 @@ import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
public class Ticker {
|
||||
public static interface TickSubscriber {
|
||||
public interface TickSubscriber {
|
||||
int getTickInterval();
|
||||
|
||||
void onTick(long mTickCount);
|
||||
@ -78,7 +78,7 @@ public class Ticker {
|
||||
mForceStop = true;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public synchronized static Ticker getInstance() {
|
||||
if (sInstance == null) {
|
||||
|
@ -128,10 +128,10 @@ public class YourTrainLayout extends RelativeLayout implements Checkable {
|
||||
R.drawable.nobike));
|
||||
}
|
||||
if (boardedDeparture.getRequiresTransfer()) {
|
||||
((ImageView) findViewById(R.id.yourTrainXferIcon))
|
||||
findViewById(R.id.yourTrainXferIcon)
|
||||
.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
((ImageView) findViewById(R.id.yourTrainXferIcon))
|
||||
findViewById(R.id.yourTrainXferIcon)
|
||||
.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
@ -179,10 +179,10 @@ public class DepartureArrayAdapter extends ArrayAdapter<Departure> {
|
||||
bikeIcon.setImageDrawable(noBikeDrawable);
|
||||
}
|
||||
if (departure.getRequiresTransfer()) {
|
||||
((ImageView) view.findViewById(R.id.xferIcon))
|
||||
view.findViewById(R.id.xferIcon)
|
||||
.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
((ImageView) view.findViewById(R.id.xferIcon))
|
||||
view.findViewById(R.id.xferIcon)
|
||||
.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ public enum RoutesColumns {
|
||||
"AVE_TRIP_LENGTH", "INTEGER", true);
|
||||
|
||||
// This class cannot be instantiated
|
||||
private RoutesColumns(String string, String type, Boolean nullable) {
|
||||
RoutesColumns(String string, String type, Boolean nullable) {
|
||||
this.string = string;
|
||||
this.sqliteType = type;
|
||||
this.nullable = nullable;
|
||||
|
@ -253,7 +253,7 @@ public class Departure implements Parcelable, Comparable<Departure> {
|
||||
}
|
||||
|
||||
public int getMeanSecondsLeft() {
|
||||
return (int) getMeanSecondsLeft(getMinEstimate(), getMaxEstimate());
|
||||
return getMeanSecondsLeft(getMinEstimate(), getMaxEstimate());
|
||||
}
|
||||
|
||||
public int getMeanSecondsLeft(long min, long max) {
|
||||
|
@ -53,7 +53,7 @@ public enum Line {
|
||||
|
||||
protected final Line transferLine2;
|
||||
|
||||
private Line(boolean directionMayInvert, Station... stationArray) {
|
||||
Line(boolean directionMayInvert, Station... stationArray) {
|
||||
this.requiresTransfer = false;
|
||||
this.directionMayInvert = directionMayInvert;
|
||||
stations = Arrays.asList(stationArray);
|
||||
@ -61,7 +61,7 @@ public enum Line {
|
||||
this.transferLine2 = null;
|
||||
}
|
||||
|
||||
private Line(Line transferLine1, Line transferLine2,
|
||||
Line(Line transferLine1, Line transferLine2,
|
||||
Station... stationArray) {
|
||||
this.requiresTransfer = true;
|
||||
this.directionMayInvert = false;
|
||||
@ -70,7 +70,7 @@ public enum Line {
|
||||
this.transferLine2 = transferLine2;
|
||||
}
|
||||
|
||||
private Line(boolean directionMayInvert, Line transferLine1,
|
||||
Line(boolean directionMayInvert, Line transferLine1,
|
||||
Line transferLine2, Station... stationArray) {
|
||||
this.requiresTransfer = true;
|
||||
this.directionMayInvert = directionMayInvert;
|
||||
|
@ -78,20 +78,20 @@ public enum Station {
|
||||
|
||||
public final static int DEFAULT_DEPARTURE_EQUALITY_TOLERANCE = 119999;
|
||||
|
||||
private Station(String abbreviation, String name, String shortName,
|
||||
Station(String abbreviation, String name, String shortName,
|
||||
boolean invertDirection, boolean endOfLine) {
|
||||
this(abbreviation, name, shortName, invertDirection, endOfLine, null,
|
||||
null, false, DEFAULT_DEPARTURE_EQUALITY_TOLERANCE);
|
||||
}
|
||||
|
||||
private Station(String abbreviation, String name, String shortName,
|
||||
Station(String abbreviation, String name, String shortName,
|
||||
boolean invertDirection, boolean endOfLine, String transferStation) {
|
||||
this(abbreviation, name, shortName, invertDirection, endOfLine,
|
||||
transferStation, null, false,
|
||||
DEFAULT_DEPARTURE_EQUALITY_TOLERANCE);
|
||||
}
|
||||
|
||||
private Station(String abbreviation, String name, String shortName,
|
||||
Station(String abbreviation, String name, String shortName,
|
||||
boolean invertDirection, boolean endOfLine,
|
||||
String inboundTransferStation, String outboundTransferStation) {
|
||||
this(abbreviation, name, shortName, invertDirection, endOfLine,
|
||||
@ -99,7 +99,7 @@ public enum Station {
|
||||
DEFAULT_DEPARTURE_EQUALITY_TOLERANCE);
|
||||
}
|
||||
|
||||
private Station(String abbreviation, String name, String shortName,
|
||||
Station(String abbreviation, String name, String shortName,
|
||||
boolean invertDirection, boolean endOfLine,
|
||||
String inboundTransferStation, String outboundTransferStation,
|
||||
boolean longStationLinger, int departureEqualityTolerance) {
|
||||
|
@ -122,9 +122,7 @@ public class StationPair implements Parcelable {
|
||||
StationPair other = (StationPair) obj;
|
||||
if (destination != other.destination)
|
||||
return false;
|
||||
if (origin != other.origin)
|
||||
return false;
|
||||
return true;
|
||||
return origin == other.origin;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,7 +26,7 @@ public class NetworkUtils {
|
||||
}
|
||||
|
||||
public static HttpResponse executeWithRecovery(final HttpUriRequest request)
|
||||
throws IOException, ClientProtocolException {
|
||||
throws IOException {
|
||||
try {
|
||||
return getHttpClient().execute(request);
|
||||
} catch (IllegalStateException e) {
|
||||
|
@ -20,8 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone" >
|
||||
</com.dougkeen.bart.controls.YourTrainLayout>
|
||||
android:visibility="gone"></com.dougkeen.bart.controls.YourTrainLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/empty"
|
||||
|
@ -36,8 +36,7 @@
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="15dip"
|
||||
android:text="@string/origin"
|
||||
android:textSize="15sp" >
|
||||
</TextView>
|
||||
android:textSize="15sp"></TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/destination_spinner"
|
||||
@ -63,8 +62,7 @@
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="15dip"
|
||||
android:text="@string/destination"
|
||||
android:textSize="15sp" >
|
||||
</TextView>
|
||||
android:textSize="15sp"></TextView>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/return_checkbox"
|
||||
|
@ -9,8 +9,7 @@
|
||||
android:id="@+id/numberPicker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
</NumberPicker>
|
||||
android:layout_weight="1"></NumberPicker>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
|
@ -11,8 +11,7 @@
|
||||
android:drawableLeft="@drawable/ic_action_alarm"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="16dp"
|
||||
android:visibility="gone" >
|
||||
</TextView>
|
||||
android:visibility="gone"></TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/yourTrainHeader"
|
||||
|
@ -4,6 +4,5 @@
|
||||
android:id="@+id/boardTrain"
|
||||
android:icon="@drawable/ic_action_boarding"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/getting_on_this_train">
|
||||
</item>
|
||||
android:title="@string/getting_on_this_train"></item>
|
||||
</menu>
|
@ -5,13 +5,11 @@
|
||||
android:id="@+id/view"
|
||||
android:icon="@drawable/ic_action_departure"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/view_departures">
|
||||
</item>
|
||||
android:title="@string/view_departures"></item>
|
||||
<item
|
||||
android:id="@+id/delete"
|
||||
android:icon="@drawable/ic_action_delete"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/delete">
|
||||
</item>
|
||||
android:title="@string/delete"></item>
|
||||
|
||||
</menu>
|
@ -5,13 +5,11 @@
|
||||
android:id="@+id/view_on_bart_site_button"
|
||||
android:icon="@drawable/ic_action_web"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/view_on_bart_site">
|
||||
</item>
|
||||
android:title="@string/view_on_bart_site"></item>
|
||||
<item
|
||||
android:id="@+id/view_system_map_button"
|
||||
android:icon="@drawable/ic_action_map"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/view_system_map">
|
||||
</item>
|
||||
android:title="@string/view_system_map"></item>
|
||||
|
||||
</menu>
|
@ -5,19 +5,16 @@
|
||||
android:id="@+id/add_favorite_menu_button"
|
||||
android:icon="@drawable/ic_action_new"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/add_route">
|
||||
</item>
|
||||
android:title="@string/add_route"></item>
|
||||
<item
|
||||
android:id="@+id/view_system_map_button"
|
||||
android:icon="@drawable/ic_action_map"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/view_system_map">
|
||||
</item>
|
||||
android:title="@string/view_system_map"></item>
|
||||
<item
|
||||
android:id="@+id/elevator_button"
|
||||
android:icon="@drawable/ic_action_elevator"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="Check elevator status">
|
||||
</item>
|
||||
android:title="Check elevator status"></item>
|
||||
|
||||
</menu>
|
@ -21,7 +21,6 @@
|
||||
android:id="@+id/delete"
|
||||
android:icon="@drawable/ic_action_delete"
|
||||
android:showAsAction="always|withText"
|
||||
android:title="@string/delete">
|
||||
</item>
|
||||
android:title="@string/delete"></item>
|
||||
|
||||
</menu>
|
@ -3,8 +3,7 @@
|
||||
|
||||
<!-- Base application theme is the default theme. -->
|
||||
|
||||
<style name="AppTheme" parent="@style/Holo.Theme">
|
||||
</style>
|
||||
<style name="AppTheme" parent="@style/Holo.Theme"></style>
|
||||
|
||||
<style name="ButtonBar">
|
||||
<item name="android:layout_width">fill_parent</item>
|
||||
|
Loading…
Reference in New Issue
Block a user