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

  • SEARCH
  • Home
  • 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 6644623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:11:19+00:00 2026-05-26T00:11:19+00:00

I have created a Gallery View with 2 Views with 3 simple TextViews to

  • 0

I have created a Gallery View with 2 Views with 3 simple TextViews to present some
of the data from my data model.
Upon calling the Invalidate method on the 2 Views it is like the
Views lose focus, the same case when I navigate in the Gallery View.

The text becomes almost unreadable after the “focus” is lost. (See the two pictures below)

I am using Monodroid, but regular Android examples are appreciated as well.

The code for my Gallery View:

<?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">
  <Gallery
    android:id="@+id/locationGallery"
    android:layout_height="match_parent"
    android:layout_width="fill_parent">

  </Gallery>
</LinearLayout>

Code for the two Views I put into the Gallery View:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:gravity="top"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="3sp"
    android:id="@+id/locationGalleryItem"
    >

  <TextView
    android:id="@+id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
        android:padding="10dp"
    android:textSize="16sp"
    />
  <TextView
  android:id="@+id/text2"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:layout_below="@id/text1"
      android:padding="10dp"
    android:textSize="16sp"
    />
  <TextView
  android:id="@+id/text3"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:layout_below="@id/text2"
      android:padding="10dp"
    android:textSize="16sp"
    />

</LinearLayout>

enter image description hereenter image description here

  • 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-26T00:11:20+00:00Added an answer on May 26, 2026 at 12:11 am

    I fixed the problem by making an EventHandler for the ItemSelected property on the Gallery View. This EventHandler tracks the current position of the Gallery View. Then invokes the method SetSelection on the Gallery View to the current position. This gives the desired result.

    Code:

    locationGallery.ItemSelected += new EventHandler<ItemEventArgs>(locationGallery_ItemSelected);
    
    void locationGallery_ItemSelected(object sender, ItemEventArgs e)
    {
        var send = sender as Gallery;
        send.SetSelection(e.Position);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a gallery view and I want to display video (like any
Hi I have created one gallery project. but I wish to created folders view
I have created a XML image gallery, which displays text in between each slide.
I have an image gallery that I created by reading the contents inside a
i have created a coverflow using the code given by http://android.jmsliu.com/138/android-infinite-loop-gallery.html . And it
I have created a gallery, and it displays a lot of images in a
In the below code i have created a gallery object and also have included
I have created a photo gallery application using Three20 framework. It works fine with
I am using Flex 4. I have created an image gallery with TileList When
I have a custom gallery plugin that I have created and I am wanting

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.