2016-05-21 6 views
2

イムが表示されません空白のページ。 これは、レイアウトのxmlです:アクティビティレイアウトは私のOrderSummaryActivityなので、このコード</p> <pre><code>Intent goToOrder = new Intent(ListOfOrdersActivity.this, OrderSummaryActivity.class); startActivity(goToOrder); </code></pre> <p>を使用して、私の主な活動から2番目の活動を呼び出そうと

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/name" 
     android:textSize="20sp" 
     android:textStyle="bold" 
     android:layout_margin="10dp" 
     /> 
    <TextView 
     android:id="@+id/order_resume_name" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/quantity" 
     android:textSize="20sp" 
     android:textStyle="bold" 
     android:layout_margin="10dp"/> 
    <TextView 
     android:id="@+id/order_resume_quantity" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/whipped_cream" 
     android:textSize="20sp" 
     android:textStyle="bold" 
     android:layout_margin="10dp"/> 
    <TextView 
     android:id="@+id/order_resume_whipped_cream" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/chocolate" 
     android:textSize="20sp" 
     android:textStyle="bold" 
     android:layout_margin="10dp"/> 
    <TextView 
     android:id="@+id/order_resume_chocolate" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 

    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/order_summary_total" 
     android:textSize="20sp" 
     android:textStyle="bold" 
     android:layout_margin="10dp"/> 
    <TextView 
     android:id="@+id/order_resume_total" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 


</LinearLayout> 

任意のヒント?

+0

。それを使用して – sandesh

答えて

2

をオーバーライドしてみてくださいにあなたのOrderSummaryActivity.classを変更してみてください:別のonCreateメソッドが存在しなければならない

public class OrderSummaryActivity extends ActionBarActivity 
    { 

     @Override 
     public void onCreate(Bundle savedInstanceState) 
     { 
      super.onCreate(savedInstanceState); 
      setContentView(R.layout.order_summary); 
     } 
    } 
+0

驚くばかり!どうもありがとう –

3

public void onCreate(Bundle savedInstanceState) 

代わりの

public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) 
関連する問題

 関連する問題