// Path: src/main/java/de/fahrgemeinschaft/util/DateImageButton.java
// public class DateImageButton extends BaseImageButton {
// 
//     static final SimpleDateFormat df =
//             new SimpleDateFormat("HH:mm", Locale.GERMANY);
//     public Button btn;
// 
//     @Override
//     protected int inflate() {
//         return R.layout.btn_date_picker;
//     }
// 
//     public DateImageButton(Context context) {
//         super(context);
//         btn = (Button) findViewById(R.id.text);
//         btn.setId(ID--);
//     }
// 
//     public DateImageButton(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         btn = (Button) findViewById(R.id.text);
//         btn.setText(getContext().getString(attrs.getAttributeResourceValue(
//                 droid, TEXT, R.string.app_name)));
//         btn.setId(ID--);
//     }
// 
//     public void setDate(long timestamp) {
//         Calendar cal = Calendar.getInstance();
//         int thisYear = cal.get(Calendar.YEAR);
//         int today = cal.get(Calendar.DAY_OF_YEAR);
//         cal.setTimeInMillis(timestamp);
//         btn.setText(new SimpleDateFormat("dd. MMM yyyy",
//                 Locale.GERMANY).format(timestamp));
//         if (cal.get(Calendar.YEAR) == thisYear) {
//             if (cal.get(Calendar.DAY_OF_YEAR) == today)
//                 btn.setText(getContext().getString(R.string.today));
//             else if (cal.get(Calendar.DAY_OF_YEAR) == today + 1)
//                 btn.setText(getContext().getString(R.string.tomorrow));
//             else if (cal.get(Calendar.DAY_OF_YEAR) == today + 2)
//                 btn.setText(getContext().getString(R.string.after_tomorrow));
//         }
//     }
// 
//     public void setTime(long timestamp) {
//         btn.setText(df.format(timestamp));
//     }
// }
// 
// Path: src/main/java/de/fahrgemeinschaft/util/PlaceImageButton.java
// public class PlaceImageButton extends BaseImageButton {
// 
//     private TextView address;
//     public Button name;
// 
//     @Override
//     protected int inflate() {
//         return R.layout.btn_place_picker;
//     }
// 
//     public PlaceImageButton(Context context) {
//         super(context);
//         name = (Button) findViewById(R.id.name);
//         name.setId(ID--);
//         address = (TextView) findViewById(R.id.address);
//         address.setId(ID--);
//     }
// 
//     public PlaceImageButton(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         name = (Button) findViewById(R.id.name);
//         name.setId(ID--);
//         name.setText(getContext().getString(attrs.getAttributeResourceValue(
//                 droid, TEXT, R.string.app_name)));
//         address = (TextView) findViewById(R.id.address);
//         address.setId(ID--);
//     }
// 
//     public void setPlace(Place place) {
//         if (place != null) {
//             name.setText(place.getName());
//             address.setText(place.getAddress());
//         }
//     }
// }


import java.util.Calendar;
import java.util.Date;
import org.teleportr.Ride;
import org.teleportr.RidesProvider;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.DatePicker;
import com.actionbarsherlock.app.SherlockFragment;
import de.fahrgemeinschaft.util.DateImageButton;
import de.fahrgemeinschaft.util.PlaceImageButton;
/**
 * Fahrgemeinschaft / Ridesharing App
 * Copyright (c) 2013 by it's authors.
 * Some rights reserved. See LICENSE..
 *
 */

package de.fahrgemeinschaft;






public class MainFragment extends SherlockFragment
        implements OnClickListener, OnDateSetListener {

    protected static final String TAG = "fahrgemeinschaft";
    private static final String STATE = "ride";
    private static final int FROM = 42;
    private static final int TO = 55;
// Path: src/main/java/de/fahrgemeinschaft/util/DateImageButton.java
// public class DateImageButton extends BaseImageButton {
// 
//     static final SimpleDateFormat df =
//             new SimpleDateFormat("HH:mm", Locale.GERMANY);
//     public Button btn;
// 
//     @Override
//     protected int inflate() {
//         return R.layout.btn_date_picker;
//     }
// 
//     public DateImageButton(Context context) {
//         super(context);
//         btn = (Button) findViewById(R.id.text);
//         btn.setId(ID--);
//     }
// 
//     public DateImageButton(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         btn = (Button) findViewById(R.id.text);
//         btn.setText(getContext().getString(attrs.getAttributeResourceValue(
//                 droid, TEXT, R.string.app_name)));
//         btn.setId(ID--);
//     }
// 
//     public void setDate(long timestamp) {
//         Calendar cal = Calendar.getInstance();
//         int thisYear = cal.get(Calendar.YEAR);
//         int today = cal.get(Calendar.DAY_OF_YEAR);
//         cal.setTimeInMillis(timestamp);
//         btn.setText(new SimpleDateFormat("dd. MMM yyyy",
//                 Locale.GERMANY).format(timestamp));
//         if (cal.get(Calendar.YEAR) == thisYear) {
//             if (cal.get(Calendar.DAY_OF_YEAR) == today)
//                 btn.setText(getContext().getString(R.string.today));
//             else if (cal.get(Calendar.DAY_OF_YEAR) == today + 1)
//                 btn.setText(getContext().getString(R.string.tomorrow));
//             else if (cal.get(Calendar.DAY_OF_YEAR) == today + 2)
//                 btn.setText(getContext().getString(R.string.after_tomorrow));
//         }
//     }
// 
//     public void setTime(long timestamp) {
//         btn.setText(df.format(timestamp));
//     }
// }
// 
// Path: src/main/java/de/fahrgemeinschaft/util/PlaceImageButton.java
// public class PlaceImageButton extends BaseImageButton {
// 
//     private TextView address;
//     public Button name;
// 
//     @Override
//     protected int inflate() {
//         return R.layout.btn_place_picker;
//     }
// 
//     public PlaceImageButton(Context context) {
//         super(context);
//         name = (Button) findViewById(R.id.name);
//         name.setId(ID--);
//         address = (TextView) findViewById(R.id.address);
//         address.setId(ID--);
//     }
// 
//     public PlaceImageButton(Context context, AttributeSet attrs) {
//         super(context, attrs);
//         name = (Button) findViewById(R.id.name);
//         name.setId(ID--);
//         name.setText(getContext().getString(attrs.getAttributeResourceValue(
//                 droid, TEXT, R.string.app_name)));
//         address = (TextView) findViewById(R.id.address);
//         address.setId(ID--);
//     }
// 
//     public void setPlace(Place place) {
//         if (place != null) {
//             name.setText(place.getName());
//             address.setText(place.getAddress());
//         }
//     }
// }


// Path: src/main/java/de/fahrgemeinschaft/MainFragment.java
import java.util.Calendar;
import java.util.Date;
import org.teleportr.Ride;
import org.teleportr.RidesProvider;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.DatePicker;
import com.actionbarsherlock.app.SherlockFragment;
import de.fahrgemeinschaft.util.DateImageButton;
import de.fahrgemeinschaft.util.PlaceImageButton;

/**
 * Fahrgemeinschaft / Ridesharing App
 * Copyright (c) 2013 by it's authors.
 * Some rights reserved. See LICENSE..
 *
 */

package de.fahrgemeinschaft;






public class MainFragment extends SherlockFragment
        implements OnClickListener, OnDateSetListener {

    protected static final String TAG = "fahrgemeinschaft";
    private static final String STATE = "ride";
    private static final int FROM = 42;
    private static final int TO = 55;
    private DateImageButton when;