1

I keep seeing "focused" and hearing about "focusing" within the development of Android apps. My question is: What is focusing, and how is it applied within Android apps? Is it important? What can you do with it?

I'm sorry if this has been asked, I looked but didn't see anything that clearly explained it. I've looked the the Android development guide, but I couldn't find a decent explanation of what it is and how it works.

4 Answers 4

2

Focus is simply giving a specific view "focus", or attention.

One example of using focus is if you have an EditTextView and you want a user to be able to type into it as soon as it is displayed, you would give focus to that EditTextView and the keyboard would automatically be displayed in accordance to typing in that view.

2

If you've ever used a blackberry and browsed the web via that, you'll remember that whenever you scroll the wheel you sort of select random elements on the page until you find what you want, then click enter. You know what element you're selecting when the elements change colors, or become focused. That's essentially what's happening with 'focused' on ANdroid, except it's mostly used for when you're scrolling via some kind of buttons, or when you select a textbox or something and it's waiting for input.

0

It is just referring to the view that is active. For example, if you have a TextView and it is the active view then it would be in focus

1
  • Correct me if I am wrong here Jacob but I believe active and focus are 2 different things. Similar in a sense but different. active being that the user is interacting with it in some way focused being that the user in the the process of interacting with it. Ex: focus clicking a button. active - having their "cursor" in a text field
    – O'Mutt
    Aug 7, 2012 at 18:51
0

Simply put, an object/item that has the user's attention for interaction is focused. It is a state an item can be in.

Android Dev UI Events

2
  • 3
    No, that is not the focused state. The focused state refers to using the keyboard to focus an element (just like you would on a desktop using the Tab key for instance.) Some views are focusable in touch mode for practical reasons (EditText for instance takes focus.)
    – Romain Guy
    Aug 7, 2012 at 18:51
  • +1 on that romain guy. The idea behind 90% of the new android devices is the touch interface making the keyboard and touch essentially seamless in this sense. Correct?
    – O'Mutt
    Aug 7, 2012 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.