Search in sources :

Example 1 with StationInfoBinding

use of de.bahnhoefe.deutschlands.bahnhofsfotos.databinding.StationInfoBinding in project RSAndroidApp by RailwayStations.

the class DetailsActivity method showStationInfo.

public void showStationInfo(final View view) {
    final StationInfoBinding stationInfoBinding = StationInfoBinding.inflate(getLayoutInflater());
    stationInfoBinding.id.setText(station != null ? station.getId() : "");
    final double lat = station != null ? station.getLat() : latitude;
    final double lon = station != null ? station.getLon() : longitude;
    stationInfoBinding.coordinates.setText(String.format(Locale.US, getResources().getString(R.string.coordinates), lat, lon));
    stationInfoBinding.active.setText(station != null && station.isActive() ? R.string.active : R.string.inactive);
    stationInfoBinding.owner.setText(station != null && station.getPhotographer() != null ? station.getPhotographer() : "");
    new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom)).setTitle(binding.details.etbahnhofname.getText()).setView(stationInfoBinding.getRoot()).setIcon(R.mipmap.ic_launcher).setPositiveButton(android.R.string.ok, null).create().show();
}
Also used : ContextThemeWrapper(android.view.ContextThemeWrapper) StationInfoBinding(de.bahnhoefe.deutschlands.bahnhofsfotos.databinding.StationInfoBinding) TaskStackBuilder(android.app.TaskStackBuilder)

Aggregations

TaskStackBuilder (android.app.TaskStackBuilder)1 ContextThemeWrapper (android.view.ContextThemeWrapper)1 StationInfoBinding (de.bahnhoefe.deutschlands.bahnhofsfotos.databinding.StationInfoBinding)1