Skip to content

Commit

Permalink
Remove unused textview for country code
Browse files Browse the repository at this point in the history
  • Loading branch information
woheller69 committed Mar 5, 2022
1 parent df0a141 commit 2f9040b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class ItemViewHolder extends RecyclerView.ViewHolder {
* Member variables
*/
private TextView tvInformation;
private TextView tvCountry;


/**
Expand All @@ -29,8 +28,6 @@ public class ItemViewHolder extends RecyclerView.ViewHolder {
public ItemViewHolder(View itemView) {
super(itemView);
tvInformation = (TextView) itemView.findViewById(R.id.city_overview_list_item_text);
tvCountry=(TextView) itemView.findViewById(R.id.city_country_code);

}

/**
Expand All @@ -39,9 +36,6 @@ public ItemViewHolder(View itemView) {
public TextView getTvInformation() {
return tvInformation;
}
public TextView getTvCountryCode() {
return tvCountry;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
@Override
public void onBindViewHolder(ItemViewHolder holder, int position) {
holder.getTvInformation().setText(cities.get(position).getCityName());
holder.getTvCountryCode().setText(database.getCityById(cities.get(position).getCityId()).getCountryCode());

}

/**
Expand Down
9 changes: 2 additions & 7 deletions app/src/main/res/layout/list_item_city_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
tools:visibility="visible" />

<TextView
android:id="@+id/city_country_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

</LinearLayout>

<LinearLayout
Expand Down

0 comments on commit 2f9040b

Please sign in to comment.