Android Open Source - spotastop Bus Line Item






From Project

Back to project page spotastop.

License

The source code is released under:

MIT License

If you think the Android project spotastop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cipciop.spotastop.presentation;
/*from  w  w w.j  a v a2  s .c om*/
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.cipciop.spotastop.LoginActivity;
import com.cipciop.spotastop.SelectBusLine;
import com.cipciop.spotastop.SpotActivity;
import com.cipciop.spotastop.StopSpotApp;
import com.cipciop.spotastop.domain.Line;
import com.cipciop.spotastop.R;

public class BusLineItem extends LinearLayout {

  private TextView lineName;

  private TextView lineDirection;

  private LayoutInflater inflater;

  private Line line;

  public BusLineItem(Context context) {
    super(context);
    inflater = (LayoutInflater) context
        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    inflater.inflate(R.layout.bus_line_item, this, true);
  }

  public void setLine(Line l) {

    this.line = l;
    this.lineName = (TextView) findViewById(R.id.lineName);
    this.lineDirection = (TextView) findViewById(R.id.lineDirection);
    this.lineName.setText(l.getName());
    this.lineDirection.setText(l.getDirezione());

    this.setOnClickListener(new OnClickListener() {

      @Override
      public void onClick(View v) {
        StopSpotApp.getInstance().setActualLine(line);
        Intent i = new Intent(getContext(), SpotActivity.class);
        getContext().startActivity(i);
      }
    });
  }

}




Java Source Code List

.LoaderTester.java
com.cipciop.spotastop.ErrorActivity.java
com.cipciop.spotastop.LoginActivity.java
com.cipciop.spotastop.RegisterActivity.java
com.cipciop.spotastop.SelectBusLine.java
com.cipciop.spotastop.SpotActivity.java
com.cipciop.spotastop.StopSpotApp.java
com.cipciop.spotastop.domain.BusStop.java
com.cipciop.spotastop.domain.GeoPos.java
com.cipciop.spotastop.domain.Line.java
com.cipciop.spotastop.domain.User.java
com.cipciop.spotastop.presentation.BusLineItem.java
com.cipciop.spotastop.services.JarvisDynDnsService.java
com.cipciop.spotastop.services.LoginService.java
com.cipciop.spotastop.services.RegistrationService.java
com.cipciop.spotastop.services.RetrieveLinesListService.java
com.cipciop.spotastop.services.SpotBusStopService.java
com.nicfix.gsoncompatibility.GsonConfigurator.java
requests.CreatorRequest.java
requests.Criteria.java
requests.Data.java
requests.EditorRequest.java
requests.Link.java
requests.LinkerRequest.java
requests.LoaderRequest.java
requests.StorerRequest.java
requests.Unlink.java
requests.beContentRequest.java
resources.Resource.java
resources.ResourcesCache.java
resources.ResourcesMapper.java
responses.AsyncCallback.java
responses.beContentResponse.java
rest.RestApi.java
settings.Settings.java