blob: 83e9c9a7d462287c87b54a19f20a20344c4427b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package org.marcinzelent.liberavem;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import com.squareup.picasso.Picasso;
public class ObservationDetailsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_observation_details);
Intent intent = getIntent();
Observation observation = (Observation) intent.getSerializableExtra("Observation");
String photoUrl = (String) intent.getSerializableExtra("Photo");
SquareImageView detailsPhoto = findViewById(R.id.details_photo);
Picasso.get().load(photoUrl).into(detailsPhoto);
TextView detailsName = findViewById(R.id.details_name);
detailsName.setText(observation.getNameEnglish());
TextView detailsCreated = findViewById(R.id.details_created);
detailsCreated.setText(observation.getCreated());
TextView detailsUser = findViewById(R.id.details_user);
detailsUser.setText(observation.getUserId());
TextView detailsPopulation = findViewById(R.id.details_population);
detailsPopulation.setText(String.valueOf(observation.getPopulation()));
TextView detailsPlacename = findViewById(R.id.details_placename);
detailsPlacename.setText(observation.getPlaceName());
TextView detailsLongitude = findViewById(R.id.details_longitude);
detailsLongitude.setText(String.valueOf(observation.getLongitude()));
TextView detailsLatitude = findViewById(R.id.details_latitude);
detailsLatitude.setText(String.valueOf(observation.getLatitude()));
TextView detailsComment = findViewById(R.id.details_comment);
if(observation.getComment() != null) detailsComment.setText(observation.getComment());
}
}
|