how to connect two layouts in eclips -


I'm beginning with a Java Android developer. I have two XML files / layouts in named activity_fast_tip.xml and activity_setting.xml I can not combine these two components together. In the activity_setting.xml

  @ override protected zero creation (bundle saved instainstate) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_fast_tip); TipPctTextView = (TextView) this.findViewById (R.id.tipPctTextView); TipAmountTextView = (TextView) this.findViewById (R.id.tipAmtTextView); TotalAmountTextView = (TextView) this.findViewById (R.id.totalAmtTextView); CalcTipAmountButton = (button) this.findViewById (R.id.calcTipButton); BillAmountTextView = (EditText) this.findViewById (R.id.billAmtEditText); CalcTipAmountButton.setOnClickListener (New onClickListener () {@Override Click Public Zero (see V) {calculateTip ();}}); }  

and activity_fast_tip

  & relationLayout xmlns: android = "http://schemas.android.com/ apk / res / android "xmlns: tools =" http://schemas.android.com/tools "Android: layout_width =" match_parent "Android: layout_height =" match_parent "Android: paddingBottom =" @ dimen / activity_vertical_margin "Android: paddingLeft =" @ Dimen / activity_horizontal_margin "Android: paddingRight =" @ dimen / activity_horizontal_margin "Android: paddingTop =" @ dimen / activity_vertical_margin "Equipment reference =". FastTipActivity "& gt; & Lt; Android: layout_alignParentTop = "true" Android: layout_centerHorizontal = "true" Android: layout_marginTop = "20dp" Android: EMS: EditText Android: id = "@ + id / billAmtEditText" Android: layout_width = "wrap_content" android: layout_height = "wrap_content" = "10" Android: gravity = "right | center_for" Android: signal = "@ string / billarm" Android: inputType = "number | numbers modified | number as"> gt; & Lt; Requestfocus / & gt; & Lt; / EditText> & Lt; Android: layout_centerHorizontal = "true" android: layout_marginTop = "1" 9 DP "Android: Text =" @ String / Countdown "/> & Lt; Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_alignLeft = "@ + id / billAmtEditText" Android: layout_below = "@ id / calcTipButton" Android: layout_marginop = "18dp" Android: text = "@ string / tip pertase" Android: text apparatus = "? Android: ATR / Text Appendixium" /> & Lt; TextView android: id = "@ + id / textView1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_alignLeft = "@ + id / TextView01" Android: layout_below = "@ + id / TextView01" Android: layout_marginLeft = "0dp" Android: Layout_marginTop = "L8dp" android: text = "@ string / tip amount" android: text = Aprerens "? Android: ATR / text Aksperensmediam" / & gt; & Lt; TextView android: id = "@ + id / textView2" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_alignLeft = "@ + id / textView1" Android: layout_below = "@ + id / textView1" Android: Leaut_mrjintop = "L8dp" android: text = "@ string / total amount" android: text = Aprerens "? Android: ATR / text Aprerens large" Android: Tekstcolr = "# FF 20000" / & gt; & Lt; Android: layout = width = "wrap_content" android: layout_height = "wrap_content" DP "Android: Text =" @ String / Button "/>  

Use layout flyer

< P> or include

  & lt; Include Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" layout = "@ layout / activity_setting" />  

Comments