i dont entirely understand...

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

i dont entirely understand...

Postby tinuz » Thu Oct 01, 2009 2:02 pm

Hi guys,

Could someone explain the following because im flabbercasted!

Its about the following:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <ImageView
  3.  
  4.         android:layout_width="wrap_content"
  5.  
  6.         android:layout_height="fill_parent"
  7.  
  8.         android:src="@drawable/shade"
  9.  
  10.         android:id="@+id/shade"
  11.  
  12.    />
  13.  
  14.     <ImageView
  15.  
  16.         android:id="@+id/detail_image"
  17.  
  18.         android:layout_width="wrap_content"
  19.  
  20.         android:layout_height="wrap_content"
  21.  
  22.         android:layout_marginLeft="20px"
  23.  
  24.         android:layout_alignBottom="@id/shade"
  25.  
  26.    />
  27.  
  28.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


The shade is 46px in height. The detailimage is dynamicly but almost all the time 150px in height.
if use android:layout_alignBottom="@id/shade" the detail image is aligned with the shade correctly, but the height of the detailimage gets 46px instead of the 150px it used to be.

When i remove android:layout_alignBottom="@id/shade" the height of the detail image is correct again but then it isnt aligned correctly of course. Basically i want the detail image bottom to be aligned with the shade.

Someone have any ideas?

Thanks!

Regards,
Tinuz
tinuz
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 29, 2009 4:02 pm

Top

Postby konic » Thu Oct 01, 2009 4:38 pm

Question #1 - Which layout are you using?
konic
Developer
Developer
 
Posts: 32
Joined: Mon Aug 24, 2009 3:16 pm

Postby tinuz » Thu Oct 01, 2009 4:39 pm

Relatice layout
Heres the full xml:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.         android:layout_width="fill_parent"
  7.  
  8.         android:layout_height="fill_parent"
  9.  
  10.         android:scrollbars="vertical"
  11.  
  12.         android:scrollbarAlwaysDrawVerticalTrack="true"
  13.  
  14.         android:isScrollContainer="true"
  15.  
  16. >
  17.  
  18. <RelativeLayout
  19.  
  20.    android:orientation="vertical"
  21.  
  22.    android:layout_width="fill_parent"
  23.  
  24.    android:layout_height="fill_parent"
  25.  
  26.    android:background="@color/background_detail"
  27.  
  28.    
  29.  
  30.    >
  31.  
  32.  
  33.  
  34.     <ImageView
  35.  
  36.         android:layout_width="wrap_content"
  37.  
  38.         android:layout_height="140px"
  39.  
  40.         android:src="@drawable/shade"
  41.  
  42.         android:id="@+id/shade"
  43.  
  44.         android:layout_marginTop="32px"
  45.  
  46.   />
  47.  
  48.     <ImageView
  49.  
  50.         android:id="@+id/detail_image"
  51.  
  52.         android:layout_width="140px"
  53.  
  54.         android:layout_height="140px"
  55.  
  56.         android:layout_marginLeft="20px"
  57.  
  58.         android:layout_alignParentBottom="true"
  59.  
  60.    />
  61.  
  62.     <nl.test.ReflectionImageView
  63.  
  64.         android:id="@+id/detail_image_mirrored"
  65.  
  66.         android:layout_width="wrap_content"
  67.  
  68.         android:layout_height="46px"
  69.  
  70.         android:src="@drawable/mask"
  71.  
  72.         android:layout_marginLeft="20px"
  73.  
  74.         android:layout_below="@id/detail_image"
  75.  
  76.    />
  77.  
  78.    
  79.  
  80.         </RelativeLayout>
  81.  
  82. </ScrollView>
  83.  
  84.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4
tinuz
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 29, 2009 4:02 pm

Postby konic » Thu Oct 01, 2009 4:43 pm

Question #2 - What's going on in that ReflectionImageView?
konic
Developer
Developer
 
Posts: 32
Joined: Mon Aug 24, 2009 3:16 pm

Postby tinuz » Thu Oct 01, 2009 4:45 pm

Just a rotation of the original image, scale it a little and change the alpha...so that its a little mirror/reflection image
tinuz
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 29, 2009 4:02 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests