Spacing between elements in LinearLayout

by Rohit » Fri, 06 Mar 2009 07:14:26 GMT


Sponsored Links
 How do I reduce the spacing between the elements in a linear layout?
I tried to set the padding to 0 as well as the vertical spacing but
that didnt seem to help. I want the textview and the imageview to be
flush together with no space between them. The following is my XML
layout file but I dont acheive what I want with it.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="0px"
        android:verticalSpacing="0px"
        android:gravity="center"
        >

        <ImageView android:id="@+id/imageid"
                           android:layout_width="107px"
                           android:layout_height="100px"
                           android:gravity="center"
                           android:padding="0px"
                           android:verticalSpacing="0px"
                           />

        <TextView android:id="@+id/textid"
                          android:layout_width="107px"
                          android:layout_height="25px"
                          android:background="#c3c3c3"
                          android:textColor="#000000"
                          android:shadowColor="#ffffff"
                          android:shadowRadius="3"
                          android:gravity="center"
                          android:padding="0px"
                         android:verticalSpacing="0px"
                      />

</LinearLayout>


--~--~---------~--~----~------------~-------~--~----~



Spacing between elements in LinearLayout

by Rohit » Fri, 06 Mar 2009 07:15:51 GMT


 Somehow the shadow on the text also doesnt show up..

Rohit




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Spacing between elements in LinearLayout

by Rohit » Fri, 06 Mar 2009 07:30:37 GMT


 This works - I was making some mistake in my code. The shadow still
doesnt work

Rohit





--~--~---------~--~----~------------~-------~--~----~



Spacing between elements in LinearLayout

by Rohit Mordani » Sat, 07 Mar 2009 10:59:55 GMT


 How do I reduce the spacing between the elements in a linear layout?
I tried to set the padding to 0 as well as the vertical spacing but
that didnt seem to help. I want the textview and the imageview to be
flush together with no space between them. The following is my XML
layout file but I dont acheive what I want with it.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="0px"
        android:verticalSpacing="0px"
        android:gravity="center"
        >

        <ImageView android:id="@+id/imageid"
                           android:layout_width="107px"
                           android:layout_height="100px"
                           android:gravity="center"
                           android:padding="0px"
                           android:verticalSpacing="0px"
                           />

        <TextView android:id="@+id/textid"
                          android:layout_width="107px"
                          android:layout_height="25px"
                          android:background="#c3c3c3"
                          android:textColor="#000000"
                          android:shadowColor="#ffffff"
                          android:shadowRadius="3"
                          android:gravity="center"
                          android:padding="0px"
                         android:verticalSpacing="0px"
                      />

</LinearLayout>


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to launch the app from the Web page?

I added to the manifest file for the activity to be launched:

<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="my_scheme"/>
</intent-filter>

I load the link in WebView:

mWebView.loadData("<a href=\"my_scheme://launch_my_app/refresh_all
\">Launch App</a>", "text/html", "utf-8");

When I click on the link I get the error -10 "The protocol is not
supported" in My WebViewClient.OnReceivedError override.

-- 

2. is there a way to retrieve the latest image taken using system camera?

hi all,

so i have an intent that use the system camera. so after i taken the
photo, it brings me back my application.

I want to display the image (just taken) as a thumbnail. How do i
retrieve that latest image from MediaStore.Images.Thumbnails.

thanks!
bryan

-- 

3. Unable to update my android app

4. VideoView with cookie.

5. (EDITED by author) My app gets killed ... but I think I know why now

6. limited distribution

7. Min SDK Bug ???