Android Open Source - spotastop Bus Line Item

From Project

Back to project page spotastop.


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) {
    inflater = (LayoutInflater) context
    inflater.inflate(R.layout.bus_line_item, this, true);

  public void setLine(Line l) {

    this.line = l;
    this.lineName = (TextView) findViewById(;
    this.lineDirection = (TextView) findViewById(;

    this.setOnClickListener(new OnClickListener() {

      public void onClick(View v) {
        Intent i = new Intent(getContext(), SpotActivity.class);


Java Source Code List