<div>package com.androidbegin.filterlistviewtutorial;</div> <div><br></div> <div>import android.app.Activity;</div> <div>import android.content.Intent;</div> <div>import android.os.Bundle;</div> <div>import android.widget.TextView;</div> <div><br></div> <div><br></div> <div><br></div> <div>public class SingleItemView extends Activity {</div> <div> // Declare Variables</div> <div> TextView txtrank;</div> <div> TextView txtcountry;</div> <div> TextView txtpopulation;</div> <div> String rank;</div> <div> String country;</div> <div> String population;</div> <div><br></div> <div> @Override</div> <div> public void onCreate(Bundle savedInstanceState) {</div> <div> super.onCreate(savedInstanceState);</div> <div> setContentView(R.layout.singleitemview);</div> <div> // Retrieve data from MainActivity on item click event</div> <div> Intent i = getIntent();</div> <div> // Get the results of rank</div> <div> rank = i.getStringExtra("rank");</div> <div> // Get the results of country</div> <div> country = i.getStringExtra("country");</div> <div> // Get the results of population</div> <div> population = i.getStringExtra("population");</div> <div><br></div> <div> // Locate the TextViews in singleitemview.xml</div> <div> txtrank = (TextView) findViewById(<font color="#ff0000">R</font>.id.rank);</div> <div> txtcountry = (TextView) findViewById(<span style="color:#ff0000;">R</span>.id.country);</div> <div> txtpopulation = (TextView) findViewById(<span style="color:#ff0000;">R</span>.id.population);</div> <div><br></div> <div> // Load the results into the TextViews</div> <div> txtrank.setText(rank);</div> <div> txtcountry.setText(country);</div> <div> txtpopulation.setText(population);</div> <div> }</div> <div>}</div> <div><br></div> <div><span style="font-size:9pt;line-height:1.5;">txtrank = (TextView) findViewById(<font color="#ff0000">R</font>.id.rank); 여기에 쓰인 R이 Cannot resolve symbol 'R' 이라고 뜨는데 어떻게 수정을 해야 하나요 ㅜㅜ</span></div> <div><br></div> <div>인터넷에 있는 예제 실행중인데 다른 클래스에서도 R만 오류가 나네요. </div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.