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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:10:52+00:00 2026-05-31T00:10:52+00:00

I am new to Android and Eclipse development, but not new to software development

  • 0

I am new to Android and Eclipse development, but not new to software development in general.

As my first real project, to get over the learning curve, I am modifying the SDK example soft keyboard to include a “macro” functionality.

The major functionality is working properly. But, I am having trouble getting the keyboard key icon to update in one of 2 situations.

I have created a function key, “Fn”, that when I press followed by a letter key will insert one of my predefined strings into the edit field – like my e-mail address.

In the first situation, when I press the function key I change the icon to signify “function active”. If I repeatedly press the function key, the icon changes back and forth between signifying active and inactive. This is correct.

In the second situation, I press the function key, the icon changes to signify “function active”, then I press a letter key. The macro string is entered in whatever text field properly, in code I then change the “function” state to inactive and update the icon.

Using Logs I can see the code is executed to properly change the icon, but the icon does not change. It is still showing the “function active” state even though I see that the internal flag has changed to inactive and I can see that the key icon drawable was written properly to have the key show the “function inactive” state.

I have tried a whole bunch of different things – to no avail.

What is going on that prevents this key icon from updating in this situation?

Everything in the second situation seems to execute the same code as in the first situation – the case that works, repeatedly pressing the function key. I can think of one difference. When repeatedly pressing the function key, the function key has “focus”. When I press the function key and then press a letter key, the letter key is the one with “focus”. I don’t know if this makes sense or not. I have tried looking for some kind of invalidate method, but I can’t find anything.

Any hints or suggestions are very appreciated.

Thanks,
Barry.

  • 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-31T00:10:54+00:00Added an answer on May 31, 2026 at 12:10 am

    If i remember correctly, the softkeyboard example uses 2 different keyboard layouts and switches between them when you press it. One has “inactive”, and the other has “active”.

    However, from my understanding, you are actually changing the physical icon without switching keyboard layouts. If this is the case, then the keyboard needs to be re-created every time. Why? When a keyboard view is created for the first time, it is reused over and over again. Even if you change the icon, it won’t necessarily recreate the view.

    I had this sort of problem before. Try recreating your Keyboard object – this will recreate the view as well. the function createKeyFromXml in the Keyboard class is where the “key” is actually created. If you put logs in this function, it is only called once for each key when the object is created/or showed for the first time.

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

Sidebar

Related Questions

I am new to Android and Eclipse development, but not new to software development
I am new to Android development using eclipse, although not new to software development
I'm new to Java/Eclipse/Android, so this is probably an easy (if not stupid) question:
I'm new to Eclipse/Android development so I'm hoping this is something basic that I'm
I'm pretty new to android development, so I hope my question is easy, but
I'm new to Android development. I'm trying to get a simple HelloWorld app going
I'm doing a test to get Android development up in Eclipse. My application crashes
I'm fairly new to eclipse and android development, and I'm having what must be
I'm new to Eclipse and I'm using for some Android development. Eclipse is making
I am new to java, eclipse, and android development, so I may be missing

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.