Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6969263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:33:31+00:00 2026-05-27T16:33:31+00:00

Below is my layout for the row template in a SimpleCursorAdapter. The ImageView with

  • 0

Below is my layout for the row template in a SimpleCursorAdapter.

The ImageView with id next_arrow disappears permanently on orientation change (going back to original orientation doesn’t make it re-appear). If I replace @drawable/arrow with @drawable/icon (copy of the standard sym_def_app_icon) it works fine. All the drawables in question are simple references to PNG files.

I thought it might be somehow related to the icons being of different dimensions, but I resized @drawable/icon to be the exact same dimensions as the arrow and it still worked fine while the arrow didn’t.

Update

Okay it gets even weirder. I renamed the arrow.png to something_not_called_arrow.png and… it works. What is going on?

This isn’t the first time I’ve seen this happen. Earlier today I had another drawable PNG that showed fine in the Eclipse Graphical Layout view, but refused to show up at all in the Emulator or on a device until I renamed the file. I tried cleaning and refreshing the project, and restarting Eclipse.

Another Update

Just had this happen again in a different situation. In Activity onCreate() I call findViewById() on a few resources to configure them, everything works fine on first load. When onCreate() is called due to an orientation change, findViewById() returns null for all these resources. This is maddening, and the answers that involve android:configChanges="keyboardHidden|orientation" aren’t real solutions at all, they are just masking the problem.

In this case I “fixed” it by renaming the layout xml for the activity from share.xml to share_activity_layout.xml. I’m starting to think there is some kind of bug in the R file generation and resource ID management in general.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="horizontal"
              android:layout_width="fill_parent"
              android:layout_height="90dp"
              android:background="@drawable/product_list_divider"
              android:paddingTop="10dp">

    <ImageView android:src="@drawable/ninja_20_65"
               android:id="@+id/category_icon" 
               android:layout_marginLeft="20dp"
               android:layout_marginRight="20dp"
               android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginTop="3dp"/>

    <LinearLayout android:orientation="vertical"
                  android:layout_weight="5"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content">

        <TextView android:id="@+id/category_name"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:text="Name" 
            style="@style/CategoryHeading" android:layout_marginTop="5dp"/>
        <TextView android:id="@+id/category_description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:text="Description"
            style="@style/CategoryDescription"/>
    </LinearLayout>

    <ImageView android:src="@drawable/arrow"
               android:layout_weight="1"
               android:layout_width="0dp"
               android:layout_marginRight="10dp"
               android:layout_height="wrap_content" android:layout_marginTop="20dp" android:id="@+id/next_arrow"/>

</LinearLayout>

I’m using Android 2.1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:33:32+00:00Added an answer on May 27, 2026 at 4:33 pm

    I renamed the arrow.png to something_not_called_arrow.png and it works.

    There was a subsequent similar issue which I “fixed” by renaming the layout xml for the activity from share.xml to share_activity_layout.xml.

    I think there is a bug in the R file generation and resource ID management in general.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the layout below I expect the rows to have exact heights first row
I have a listView with custom objects defined by the xml-layout below. I want
Below is the code of a simple html with a table layout. In FF
In the HTML below, the layout works when the actionBar class has a float
I have a border layout whose center panel is defined like the below. {
Below are lines from the c++ programming language template<class T > T sqrt(T );
Simple problem: With the XML layout shown below, I have some views wrapped in
I use ListView to show several items. My row.xml as below: <TextView android:text=text android:id=@+id/tvViewRow
Let me explain the basic layout below: |----------------------------| | title banner | | |
I have a layout that looks like the following like below. My problems is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.