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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:00:43+00:00 2026-06-07T05:00:43+00:00

I am trying to forward values to an Android RemoteView. Some values can be

  • 0

I am trying to forward values to an Android RemoteView. Some values can be forwarded via the set methods that use reflection. Eg background color works:

rv.setInt(R.id.viewId, "setBackgroundColor", 0xffff0000);

Although that mechanism looks pretty generic for one param methods calls, it doesn’t work for certain methods. Eg. setting the alpha on a view doesn’t work (running on api level 15):

rv.setFloat(R.id.viewId, "setAlpha", 0.5f);

The framework complains at runtime that setAlpha(float) is not supported. Does anybody know why that is the case? What is the rule for supported methods on remote view? Why would’t alpha be among them?

Update:

The answer from CommonsWare is correct. After some more research it might be interesting for some that ImageView.setAlpha(int) is remotable. It only sets the alpha on the image and therefore does not apply to ninepatches etc. But it could be useful for some.

  • 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-06-07T05:00:45+00:00Added an answer on June 7, 2026 at 5:00 am

    Does anybody know why that is the case? What is the rule for supported methods on remote view?

    setBackgroundColor() has the @RemotableViewMethod annotation. setAlpha() does not.

    Why would’t alpha be among them?

    That could be anything from a concrete technical reason to a simple oversight. You are welcome to either file a feature request on http://b.android.com to have that annotation be added in some future version of Android, or perhaps implement it and submit a patch.

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

Sidebar

Related Questions

I'm trying to use forward declarations as much as I can to minimize compilation
I am trying to create an extension method that i can forward a IList
I am trying to forward declare a class that is derived from a template
We are trying to use the HornetQ store and forward mechanism... however forwarding messages
I'm trying to implement some pixel tracking where I will save certain values in
I am trying to call cudppSort to sort a set of keys/values. I'm using
I have a fairly straight-forward scenario that I am trying to solve but I'm
My question is pretty straight forward. I am trying to style the background of
Trying to clean up some code. I have a button that has the following
I'm trying to retrieve attribute values set by a servlet in a JSP page,

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.