Images not refreshing (FIXED)

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

Images not refreshing (FIXED)

Postby myazuid » Thu Apr 16, 2009 3:37 pm

Hello,

I'm working on my main menu at the moment, and all is at last beginning to take shape, but I'm having some trouble with the images I have used for buttons. I re-sized them as to ensure that they all fit on the screen, but when I load up the emulator the images are the same and do not refresh... is there a way to flush the memory of resources (presuming it has loaded them in). I have tried even removing the images from the res/drawables folder but they still remain! I'm experiencing a strange problem with the size issue, where the lowest image is mishapen, and my text won't stay to the right of it!

As a side question - how is that I could change my relative layout (base view) so that it would scroll, allowing me to have larger images as buttons?

many thanks in advance, below is my XML as it stands -

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.         android:id="@+id/lo_mainRelative"
  4.         android:layout_width="fill_parent"
  5.         android:layout_height="fill_parent"
  6.         >
  7. <TextView
  8.         android:id="@+id/txt_mainTitle"
  9.         android:layout_width="wrap_content"
  10.         android:layout_height="wrap_content"
  11.         android:text="Gift for the Gabbers"
  12.         android:textSize="24sp"
  13.         android:layout_alignParentTop="true"
  14.         android:layout_centerInParent="true"
  15.        
  16.         >
  17. </TextView>
  18. <TextView
  19.         android:id="@+id/txt_welcome"
  20.         android:layout_width="fill_parent"
  21.         android:layout_height="wrap_content"
  22.         android:text="Welcome to the Gift for the Gabbers, an application that can assist you in keeping track of how you use your phone!"
  23.         android:layout_below="@+id/txt_mainTitle"
  24.         android:layout_centerHorizontal="true"
  25.         android:padding="10px"
  26.         android:layout_marginBottom="10px"
  27.         >
  28. </TextView>
  29. <ImageButton
  30.         android:id="@+id/btn_globalStats"
  31.         android:src="@drawable/charts2"
  32.         android:layout_width="wrap_content"
  33.         android:layout_height="wrap_content"
  34.         android:layout_below="@+id/txt_welcome"
  35.         android:layout_alignParentLeft="true"
  36.         >
  37. </ImageButton>
  38. <TextView
  39.         android:id="@+id/txt_globalStats"
  40.         android:layout_width="wrap_content"
  41.         android:layout_height="wrap_content"
  42.         android:text="Click here to view overall stats regarding your phone usage"
  43.         android:textSize="12sp"
  44.         android:layout_alignTop="@+id/btn_globalStats"
  45.         android:layout_toRightOf="@+id/btn_globalStats"
  46.    android:layout_marginLeft="10px"
  47.         >
  48. </TextView>
  49. <ImageButton
  50.         android:id="@+id/btn_contactSpecific"
  51.         android:src="@drawable/contact"
  52.         android:layout_width="wrap_content"
  53.         android:layout_height="wrap_content"
  54.         android:layout_below="@+id/btn_globalStats"
  55.         >
  56. </ImageButton>
  57. <TextView
  58.         android:id="@+id/txt_contactSpecific"
  59.         android:layout_width="wrap_content"
  60.         android:layout_height="wrap_content"
  61.         android:text="Click here to view stats on a specific contact"
  62.         android:textSize="12sp"
  63.         android:layout_alignTop="@+id/btn_contactSpecific"
  64.         android:layout_toRightOf="@+id/btn_contactSpecific"
  65.         android:layout_marginLeft="10px"
  66.         >
  67. </TextView>
  68. <ImageButton
  69.         android:id="@+id/btn_thisMonth"
  70.         android:src="@drawable/month"
  71.         android:layout_width="wrap_content"
  72.         android:layout_height="wrap_content"
  73.         android:layout_below="@+id/btn_contactSpecific"
  74.         android:layout_alignParentLeft="true"
  75.         >
  76. </ImageButton>
  77. <TextView
  78.         android:id="@+id/txt_thisMonth"
  79.         android:layout_width="wrap_content"
  80.         android:layout_height="wrap_content"
  81.         android:text="Click here to view information regarding your usage this month"
  82.         android:textSize="12sp"
  83.         android:layout_alignTop="@+id/btn_thisMonth"
  84.         android:layout_toRightOf="@+id/btn_thisMonth"
  85.    android:layout_marginLeft="10px"
  86.         >
  87. </TextView>
  88. <ImageButton
  89.         android:id="@+id/btn_settings"
  90.         android:src="@drawable/settings"
  91.         android:layout_width="wrap_content"
  92.         android:layout_height="wrap_content"
  93.         android:layout_below="@+id/btn_thisMonth"
  94.         android:layout_alignParentLeft="true"
  95.         >
  96. </ImageButton>
  97. <TextView
  98.         android:id="@+id/txt_settings"
  99.         android:layout_width="wrap_content"
  100.         android:layout_height="wrap_content"
  101.         android:text="Change the settings of this application"
  102.         android:textSize="12sp"
  103.         android:layout_alignTop="@+id/btn_settings"
  104.         android:layout_toRightOf="@+id/btn_Settings"
  105.    android:layout_marginLeft="10px"
  106.         >
  107. </TextView>
  108. </RelativeLayout>
  109.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


edit - All fixed now!
Image
myazuid
Freshman
Freshman
 
Posts: 8
Joined: Fri Feb 27, 2009 6:01 pm
Location: London, England

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests