lab pause
This commit is contained in:
parent
e2fea3a851
commit
ffad4f9e50
|
@ -0,0 +1,39 @@
|
|||
package at.fhj.airkoality.model;
|
||||
|
||||
public class Location {
|
||||
|
||||
private String location;
|
||||
private String city;
|
||||
private String county:
|
||||
|
||||
|
||||
public Location(String location, String city, String county) {
|
||||
this.location = location;
|
||||
this.city = city;
|
||||
this.county = county;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCounty() {
|
||||
return county;
|
||||
}
|
||||
|
||||
public void setCounty(String county) {
|
||||
this.county = county;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package at.fhj.airkoality.ui.adapter;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import at.fhj.airkoality.model.Location;
|
||||
|
||||
public class LocationListAdapter extends RecyclerView.Adapter<LocationListAdapter.LocationItemViewHolder> {
|
||||
|
||||
|
||||
private List<Location> location;
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LocationItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull LocationItemViewHolder locationItemViewHolder, int i) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
class LocationItemViewHolder extends RecyclerView.ViewHolder{
|
||||
public LocationItemViewHolder(@NonNull View itemView){
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:id="@+id/cvLocationItem"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvlocation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tcCountry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.v7.widget.CardView>
|
10
README.md
10
README.md
|
@ -30,3 +30,13 @@
|
|||
- Editieren der Farben, Strings und Styles in den jeweiligen Files unter /res/values/
|
||||
- Hinzufügen der Activities in der AndroidManifest.xml Datei
|
||||
- strings.xml kennengelernt um Texte einer App zentral verwalten zu können
|
||||
|
||||
## 08.03.2019
|
||||
|
||||
Context -> weiß was in der App gerade "abgeht" (Java Objekt)
|
||||
- Activity oder Application
|
||||
- Immer Context der aktuellen Activity verwenden
|
||||
|
||||
Best Practise kennengelernt um große Listen darzustellen
|
||||
|
||||
Fragments ->
|
Loading…
Reference in New Issue