Hello I have a app im working on that I lost the source code to when my computer crashed I was able to decompile my apk to make it a project again however I need to make a few changes to it so what i need help with is this i have a sliding drawer that has a button in it I want it to open the play store when the user clicks it I know how to do this via a java activity however it only decompiled my code via smali code so I need to know if there is a way to open the play store from a button click via xml
here's my Main code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="#id/frame" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.d4a.tobiaslauncher.AnimationOnResume android:id="#id/animation_on_resume" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<com.d4a.tobiaslauncher.AnimationOpenFolder android:id="#id/animation_open_folder" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:id="#id/folder_container" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout android:id="#id/folder_title_area" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginLeft="7.0dip" android:layout_marginRight="7.0dip">
<EditText android:textSize="36.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center_vertical" android:id="#id/folder_title" android:background="#drawable/folder_title" android:layout_width="fill_parent" android:layout_height="58.0dip" android:includeFontPadding="false" android:inputType="text" android:textCursorDrawable="#drawable/caret" />
<Button android:layout_gravity="right|center" android:id="#id/folder_title_clear" android:background="#drawable/folder_title_xbutton" android:layout_width="19.0dip" android:layout_height="19.0dip" android:layout_marginRight="16.0dip" />
</FrameLayout>
<net.suckga.ilauncher.paging.PageScrollView android:id="#id/folder_scroll_container" android:visibility="invisible" android:scrollbars="none" android:fadingEdge="none" android:layout_width="1.0dip" android:layout_height="1.0dip">
<LinearLayout android:orientation="horizontal" android:id="#id/folder_scroll_content" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</net.suckga.ilauncher.paging.PageScrollView>
<com.d4a.tobiaslauncher.PageIndicator android:layout_gravity="bottom" android:id="#id/folder_page_indicator" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="-17.0dip" />
</LinearLayout>
<RelativeLayout android:layout_gravity="top" android:id="#id/springboard_container" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.d4a.tobiaslauncher.DockBar android:id="#id/dockBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" />
<com.d4a.tobiaslauncher.PageIndicator android:id="#id/page_indicator" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="#id/dockBar" />
<net.suckga.ilauncher.paging.PageScrollView android:id="#id/scrollContainer" android:visibility="invisible" android:scrollbars="none" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="#id/page_indicator">
<LinearLayout android:orientation="horizontal" android:id="#id/scrollView" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</net.suckga.ilauncher.paging.PageScrollView>
<fragment android:name="com.d4a.tobiaslauncher.QuickLaunch"
android:id="#+id/quicklaunch"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="bottom"/>
</RelativeLayout>
<com.d4a.tobiaslauncher.MovingIconView android:id="#id/panelMoving" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:contentDescription="#null" />
<LinearLayout android:gravity="center" android:id="#id/logoPanel" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:id="#id/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="#drawable/logo" android:contentDescription="#null" />
</LinearLayout>
</FrameLayout>
Sliding Drawer code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<SlidingDrawer android:id="#id/slidingDrawer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="4.0dip" android:handle="#id/handle" android:content="#id/content">
<ImageView android:id="#id/handle" android:layout_width="fill_parent" android:layout_height="20.0dip" />
<LinearLayout android:orientation="vertical" android:id="#id/content" android:background="#color/drawerbg" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:id="#id/web" android:layout_width="fill_parent" android:layout_height="72.0dip" android:layout_marginLeft="15.0dip" android:layout_marginTop="8.0dip" android:layout_marginRight="15.0dip" android:layout_marginBottom="8.0dip" android:onClick="web" layout="#layout/web_card" />
<include android:id="#id/mail" android:layout_width="fill_parent" android:layout_height="72.0dip" android:layout_marginLeft="15.0dip" android:layout_marginTop="8.0dip" android:layout_marginRight="15.0dip" android:layout_marginBottom="8.0dip" android:onClick="email" layout="#layout/email_card" />
<include android:id="#id/musiccard" android:layout_width="fill_parent" android:layout_height="72.0dip" android:layout_marginLeft="15.0dip" android:layout_marginTop="8.0dip" android:layout_marginRight="15.0dip" android:layout_marginBottom="8.0dip" android:onClick="music" layout="#layout/music_card" />
<include android:id="#id/playcard" android:layout_width="fill_parent" android:layout_height="72.0dip" android:layout_marginLeft="15.0dip" android:layout_marginTop="8.0dip" android:layout_marginRight="15.0dip" android:layout_marginBottom="8.0dip" android:onClick="play" layout="#layout/playstore_card" />
<include android:layout_gravity="center" android:id="#id/buttons" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="#layout/buttons2" />
</LinearLayout>
</SlidingDrawer>
</RelativeLayout>
Playstore Button card:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:background="#drawable/card_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:onClick="play"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="#id/playicon" android:padding="5.0dip" android:layout_width="68.0dip" android:layout_height="68.0dip" android:src="#drawable/play" android:layout_centerVertical="true" />
<TextView android:textSize="30.0sp" android:textColor="#color/cardText" android:id="#id/play" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Google Play" android:layout_toRightOf="#id/playicon" android:layout_centerVertical="true" />
</RelativeLayout>
any help would be awesome
Thanks way in advance!!
You cannot do this with only XML code. You must create an OnClickListener or declare a onClick method and start the Activity in Java.
Maybe I'm misunderstanding your question. If so, I'm sorry, please let me know, and I'll change my answer.
But if you have a button and you want to go to a different activity it is very simple.
Simply add:
android:onClick="functionName"
to the XML of the button.
Then in your java, create a function called functionName that takes View view as a parameter and then create an intent to the new activity and start it.
public void functionName(View view) {
Intent intent = new Intent(getApplication(),classToGoTo.class);
startActivity(intent);
}
Or however else you want to go to that other activity. Or whatever else you want to do. Just put it inside of the functionName function.
I hope this helps. Good luck :)
Related
I have problem with the XML file in android studio I'm very new to it and I want to design a text and below the text, there are two buttons but when it runs all content located at (0,0) location at the end only the last button appear in the device
here's my code
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.tabarek.mysecondapplication.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Information!"
android:id="#+id/hello"
/>
<Button
android:id="#+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="SayHi"
android:text="About Me"
android:layout_below="#+id/hello"
/>
<Button
android:id="#+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="SayHi"
android:text="My Email"
android:layout_below="#+id/button"
/>
</android.support.constraint.ConstraintLayout>
at the end,
the result appears like this
can you help me, please?
try this use LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="#+id/hello"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Information!" />
<Button
android:id="#+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="SayHi"
android:text="About Me" />
<Button
android:id="#+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="SayHi"
android:text="My Email" />
</LinearLayout>
i created button and other...
but now when i want to create a three buttons green,red,blue they are not showing up i want them to be directly down the button1 but they are not showing up i wish you can help me this is the error im getting -xml documents must start and end within the same entity the error is showing in the last last last linearlayout
this is the code im having problem with
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:id="#+id/secondLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/Greetings"
android:textSize="20sp" />
<Button
android:id="#+id/Button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/hello" />
</LinearLayout>
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</RelativeLayout>
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/thirdLine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:background="#ff0000"
android:textColor="#000000"
android:text="red" />
<TextView
android:id="#+id/fourthLine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:background="#00ff00"
android:textColor="#000000"
android:text="green" />
<TextView
android:id="#+id/fifthLine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:background="#0000ff"
android:textColor="#000000"
android:text="blue" />
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</RelativeLayout>
</LinearLayout>
this is a picture for the red blue green buttons where to be while mine are down
https://www.dropbox.com/s/73grdc0iff3ql3u/Untitled.png
this is what i reached to till now but i want them to be equally distributed like the picture above
https://www.dropbox.com/s/73grdc0iff3ql3u/Untitled.png
you have not closed the below linear layout tag in your xml.
"<"LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:orientation="horizontal" ">"
You need one more </LinearLayout> at the end of your xml file. At the minute, only 2 of the 3 LinearLayout's are being closed.
EDIT
The reason your Buttons are appearing at the bottom is because of this:
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</RelativeLayout>
I'm not sure what purpose this serves in your application, but removing that will fix your problem.
Replace your xml with following code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="10" >
<TextView
android:id="#+id/secondLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="20sp" />
<Button
android:id="#+id/Button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="HelloWord" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="5dp"
android:weightSum="10" >
<TextView
android:id="#+id/thirdLine"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.3"
android:background="#ff0000"
android:text="red"
android:textColor="#000000"
android:gravity="center" />
<TextView
android:id="#+id/fourthLine"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.4"
android:background="#00ff00"
android:text="green"
android:textColor="#000000"
android:gravity="center" />
<TextView
android:id="#+id/fifthLine"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.3"
android:background="#0000ff"
android:text="blue"
android:textColor="#000000"
android:gravity="center"/>
</LinearLayout>
</LinearLayout>
Hope it will help you.
I want a RelativeLayout based android UI that looks like the below mock graphic:
Below is my layout xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/RelativeLayoutForPreview"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- surface view that contains camera preview , and seats above #+id/linearLayoutToolbar -->
<SurfaceView
android:id="#+id/surfaceViewBarcodeScanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- LinearLayout that contains toolbar that is divided into 3 sections horizontally -->
<LinearLayout
android:id="#+id/linearLayoutToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/surfaceViewBarcodeScanner"
android:orientation="horizontal" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_left" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_center_toolbar" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_right_landscape_button" />
</LinearLayout>
</RelativeLayout>
I used Eclipse GUI palette and my own editing , however the output was not what I expected, the SurfaceView seems to covering all the screen, the LinearLayout at the bottom does not appear.
Snapshot of my current result on Galaxy S3 device:
Any help will be appreciated, Thanks.
Could you please try out to modify your layout as the follows:
Define your SurfaceView and set it's layout_above value to the ID of the linear layout made in the previous step. Set the layout_alignParentTop to true.
Define your bottom linear layout and set the layout_alignParentBottom to true.
Smart code snippet with only the important parts:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android">
<SurfaceView
android:id="#+id/surfaceViewBarcodeScanner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_above="#+id/linearLayoutToolbar" />
<LinearLayout
android:id="#+id/linearLayoutToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
I hope this will solve your problem.
you can use Linearlayout instead of Realtive Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<SurfaceView
android:id="#+id/surfaceViewBarcodeScanner"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<LinearLayout
android:id="#+id/linearLayoutToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- inside elements -->
</LinearLayout>
</LinearLayout>
else you should use android:layout_above="#+id/linearLayoutToolbar" to your surfaceview
and remove android:layout_below attribute and add android:layout_alignParentBottom="true" to your toolbar view.
// try this
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/LinearLayoutForPreview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
android:orientation="vertical">
<LinearLayout
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="match_parent">
<SurfaceView
android:id="#+id/surfaceViewBarcodeScanner"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayoutToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="0dp"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_left" />
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="0dp"
android:gravity="center"
android:layout_weight="2">
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_center_toolbar" />
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="0dp"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/scanner_bottom_right_landscape_button" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
i want to create a listView with swipe (front and background) from here:
https://github.com/47deg/android-swipelistview
https://github.com/47deg/android-swipelistview-sample/
i created an xml file which defines the row element:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/front"
android:tag="front"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#ffffff">
<ImageView
android:id="#+id/ImageView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/ImageView01"
android:layout_centerHorizontal="true"
android:textSize="18sp"
android:textStyle="bold"
android:inputType="textMultiLine" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="#+id/back"
android:background="#e3e3e3"
android:tag="back"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
>
<Button
android:id="#+id/deleteBtn1"
android:layout_width="150dp"
android:layout_height="100dp"
android:text="Delete" />
<Button
android:id="#+id/UpdateBtn1"
android:layout_width="150dp"
android:layout_height="100dp"
android:text="Update" />
</LinearLayout>
</FrameLayout>
and the listview xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/linearLayout1"
android:orientation="vertical" >
<EditText android:id="#+id/EditText01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:hint="Search">
</EditText>
<com.fortysevendeg.android.swipelistview.SwipeListView
xmlns:swipe="http://schemas.android.com/apk/res-auto"
android:id="#+id/example_lv_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#drawable/profile_listview_back"
android:listSelector="#00000000"
swipe:swipeActionLeft="dismiss"
swipe:swipeActionRight="reveal"
swipe:swipeBackView="#+id/back"
swipe:swipeCloseAllItemsWhenMoveList="true"
swipe:swipeFrontView="#+id/front"
swipe:swipeMode="both" />
</LinearLayout>
however when i run this listview, it shows me the background over the front(i want that only when i swipe the front it will show me the back)
i want that the delete and update button will show only when swipe the front..
how can i solve it? thanks alot
In your row-layout you should have the LinearLayout before RelativeLayout
It's important the order of elements
<LinearLayout>
.... buttons ....
</LinearLayout>
<RelativeLayout>
.... image and text ....
</RelativeLayout>
I am on the 36th tutorial of thenewboston android app development on youtube. He has had us copy and paste our code (cause we are supposed to know how to do it by now). I copied and pasted it, didnt work so i tried typing it all out. Still didnt work. My R.id isnt working. I have already had problems with this before so i knew to check my XML file. and in there everything is crazy. I get an error everywhere i have android:layout_width="match_parent". Did some research and i guess that got updated to "fill_parent" changed that, now I get an error in my XML saying "error: ERROR parising XML: not well-formed (invalid token)". I have tried starting over mulitple times. cleaning project. Restarting. Triple checking my code. I dont know what im doing wrong. please help guys! Im going nuts!! Thanks in advanced.
<?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"
android:weightSum="100"
<ScrollView
android:layout_weight="30"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:text="Email address(es):"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="#+id/etEmails"
/>
<TextView
android:text="Hatfull intro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="#+id/etIntro"
/>
<TextView
android:text="Persons name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/etName"
/>
<TextView
android:text="Stupid things this person does:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="etThings"
/>
<TextView
android:text="What do you want to do to this person?"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="#+id/etAction"
/>
<TextView
android:text="Hatefull Outro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="#+id/etOutro"
/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="40">
<Button
android:text="Send"
android:id="#+id/bSentEmail"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</Button>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="30">
<AnalogClock
android:id="#+id/analogClock1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</AnalogClock>
</LinearLayout>
</LinearLayout>
You missed a > at the end of line 6:
change
android:weightSum="100"
to
android:weightSum="100">