Back to project page Bussan.
The source code is released under:
Copyright 2011 Kristian Bendiksen. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project Bussan listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package no.kriben.bussan; //from ww w .j a v a 2 s . c o m import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.app.ActionBar; import android.graphics.Paint; import android.os.Bundle; import android.widget.TextView; public class BusDepartureDetailActivity extends SherlockActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bus_departure_detail); final TextView lineView = (TextView) findViewById(R.id.line); final TextView fromView = (TextView) findViewById(R.id.from); final TextView destinationView = (TextView) findViewById(R.id.destination); final TextView scheduledTimeView = (TextView) findViewById(R.id.scheduledtime); final TextView estimatedTimeView = (TextView) findViewById(R.id.estimatedtime); Bundle extras = getIntent().getExtras(); if (extras != null) { ActionBar actionBar = getSupportActionBar(); actionBar.setTitle("Bussan: " + extras.getString("busstop")); lineView.setText(extras.getString("line")); fromView.setText(extras.getString("busstop")); destinationView.setText(extras.getString("destination")); final String scheduledTime = extras.getString("scheduledTime"); final String estimatedTime = extras.getString("estimatedTime"); scheduledTimeView.setText(scheduledTime); if (!estimatedTime.equals(scheduledTime)) { scheduledTimeView.setPaintFlags(scheduledTimeView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); } estimatedTimeView.setText(estimatedTime); } } }