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 7166995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:30:16+00:00 2026-05-28T14:30:16+00:00

I am trying to do a wiki like activity where there is a faded

  • 0

I am trying to do a wiki like activity where there is a faded background image thats downloaded from a repo and fades in to the background behind a linear layout. There are three problems I am having.

XML:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView 
        android:id="@+id/bg_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:cropToPadding="true"
        android:scaleType="centerCrop" />
    <LinearLayout 
        android:orientation="vertical" 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#00000000"
        android:textColor="#FFFFFF" >
        <LinearLayout>Several layouts within here....</LinearLayout>
    </LinearLayout>
</FrameLayout>

1) I can get the image to show, but some some elements within the LinearLayout are not transparent until I open another app, then go back to my app. I think there might be some weird view caching built into android thats causing things like linearlayouts to have a solid background.

2) I cannot get the image to be ‘faded’ in the background. I almost want to just darken the image so the text on top of it stands out more. Would this be opacity on the image?

3) The animation to fade in doesn’t work. I am using an AsyncTask to call back to a listener to set the background. Here is the code I use in the activity, InfoActivity:

bg =(ImageView)findViewById(R.id.bg_image);
public void onBgImageResponse(Bitmap background) {
    if(background != null) {
        bg.setAlpha(50);
        bg.setImageBitmap(background);
        Animation myFadeInAnimation = AnimationUtils.loadAnimation(InfoActivity.this, R.anim.fadein_bg);
        bg.setBackgroundDrawable(new BitmapDrawable(this.getResources(), background));
        bg.startAnimation(myFadeInAnimation);
    }
}

In fadein_bg.xml I have:

<?xml version="1.0" encoding="UTF-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android"> 
    <alpha android:fromAlpha="0.0" 
        android:toAlpha=".5" 
        android:interpolator="@android:anim/accelerate_interpolator"  
        android:duration="2000" android:repeatCount="infinite"/> 
</set>

Any help is greatly appreciated. I will put a bounty out if needed.

  • 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-28T14:30:17+00:00Added an answer on May 28, 2026 at 2:30 pm
    1. This most likely isnt due to caching. I would check on if the image is actually being set properly. It sounds like your just not setting/refreshing your views properly.

    2. You’ll need to set the alpha on this image:
      image.setAlpha(x); // x is the alpha you want

    3. Remove ‘bg.setImageBitmap(background);’ and set the alpha last.

    In your fadedin xml try removing the repeatCount and interpolator and see if that helps.

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

Sidebar

Related Questions

I'm trying to remove wiki formatting from some text so it can be parsed.
I'm trying to follow the example on http://developers.cloudmade.com/wiki/iphone-sdk/Create_basic_Local_Search_and_Geocoding_app . The example from svn provided
I am trying to run mvn install as described here: http://sourceforge.net/p/openimaj/wiki/OpenIMAJ%20From%20Source/ I have downloaded
I am trying to get the list of people from the http://en.wikipedia.org/wiki/Category:People_by_occupation . I
I'm trying to find a simple wiki like script to setup a personal directory,
I'm trying to disable sortablerows functionality from a grid. I'd like to have the
I'm trying to install Gitolite as in the http://wiki.dreamhost.com/Gitolite I get the error like
I'm trying to migrate from a Nexus maven repo to using https://github.com/jcaddel/maven-s3-wagon . Getting
I'm trying screwturn wiki, and it's pretty good, but I would like to try
I'm trying something like this to launch the compass from within my app: NSString

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.