0% found this document useful (0 votes)
43 views

Android Chapter 2 Notes

Android chapter 2 notes

Uploaded by

aherrani757
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
43 views

Android Chapter 2 Notes

Android chapter 2 notes

Uploaded by

aherrani757
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
pel programming {BBA (CA): Som. VI} 2.29 ° Activity, Intent and Layout ndroidiide"@rid/txtPassword” indroid:inputTypes"textPassword"/> ptableRow> ‘rableROW? qrextview /> checkBox. android: id="@+4d/chkRemenberPassword” jndroid: 1ayout_width="#411_parent™ android: Layout_height="wrap_content” android: text="RememberPassword"/> «/TableRow> cTableRow> res > I layout > activity_main.xml and add the below code to that file. Below is the code for the activity_main.xml file. Gaeik Kamil Khan Fig. 2.23: Constraint Layout Android Programming [BBA (CA) : Sem. VI] 234 ‘Activity Intent and Layou, FrameLayout . The FrameLayout layout is a placeholder on screen that you can use to display a single view. Views that you add to a FrameLayout are always anchored to the top left of the layout. ean + Consider the following content in main.xml: <2xml version="1.0" encoding="utf-8"?> canageview android: “@mipmap/butterfly" android: layout_width=" android: Layout_height= e/FrameLayout> rap_content" wrap_content"/> «/relativeLayout> Here, you have a FrameLayout within a RelativeLa ithi: ; yout. Within the FrameLayout, you embed an ImageView. The Ulis shown in Fig. 2.25. you Fig, 2.25: FrameLayout within RelativeLayout If you add another view (such as a Button view) within the FrameLayout, the view overlaps the previous view (See Fig. 3.26) “wrap_content" ayout_height=' android:text="Hello, Android!” android: layout_alignParentTop="true" "wrap_content™ ivity, Intent periraid Programming [BBA (CA) : Sem. VO} 2.36 Activity, Intent and Lay, leyout_glignParentStart="true"/> yout rap_content" slayout_width= ‘wrep_content” :leyout_elignStert="@+id/1b1Comments” : layout_below="@+id/1b1Comments" layout_centerHorizontal="true"> layout, android: src="@nipmap/butterfly” android: leyout_width="wrap_content” android: leyout_height="wrap_content"/> layout_width="124dp" android: leyout_height="wrap_content” android:text="PrintPictur | | | | A Fi Fig. 2.26: Overlappin, , ig Of FrameLay EEX] scrotview oat 4 i Space than tj Linearlayout ild view or Views; he physical display. The + In Scrottyi, Toup, which normally is # lew a pri + ld view, group that contains one other niold Programming [BBA (CA): Sem, vi a 2.37 Activity, Intent and Layout Scroll up to see bottorn view. is visible, i viible it you roll ony more, Fig. 2.27: absoluteLayout in Android + The following main.xml content she which is contains some Button and E

You might also like