package com.androidbegin.filterlistviewtutorial;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
public class SingleItemView extends Activity {
// Declare Variables
TextView txtrank;
TextView txtcountry;
TextView txtpopulation;
String rank;
String country;
String population;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.singleitemview);
// Retrieve data from MainActivity on item click event
Intent i = getIntent();
// Get the results of rank
rank = i.getStringExtra("rank");
// Get the results of country
country = i.getStringExtra("country");
// Get the results of population
population = i.getStringExtra("population");
// Locate the TextViews in singleitemview.xml
txtrank = (TextView) findViewById(R.id.rank);
txtcountry = (TextView) findViewById(R.id.country);
txtpopulation = (TextView) findViewById(R.id.population);
// Load the results into the TextViews
txtrank.setText(rank);
txtcountry.setText(country);
txtpopulation.setText(population);
}
}
txtrank = (TextView) findViewById(R.id.rank); 여기에 쓰인 R이 Cannot resolve symbol 'R' 이라고 뜨는데 어떻게 수정을 해야 하나요 ㅜㅜ
인터넷에 있는 예제 실행중인데 다른 클래스에서도 R만 오류가 나네요.