ここに問題があります。エミュレータでアプリケーションを実行すると、xmlの私のUI要素が表示されません。xmlのUi要素がエミュレータに表示されませんか?
public void OnCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.single_coll);
Button one = (Button) findViewById(R.id.all_stampii);
one.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), AllStampii.class);
startActivity(intent);
}
});}
single_coll.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="All Stampii" android:id="@+id/all_stampii" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Owned" android:id="@+id/owned" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Repeated" android:id="@+id/repeated" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Last Acquired" android:id="@+id/last_ac" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout>
エラーはありません。私はちょうどこのクラスで、エミュレータでUi要素を見ることができません。 提案がありますか?
ええ、それが問題だったと呼ばれる...どうもありがとう! – hardartcore
ようこそ。この回答を投票することを検討してください。 – Khawar