Android :: How To Keep Focus On A Widget/

Oct 1, 2010

do you know if it is possible to keep focus in a widget even if other widgets that are partially visible or not visible at all changes its height size?I wouldn't like to have my screen jump vertically in front of the user because some other widget updated itself to accommodate more data.

Android :: how to keep focus on a widget/


Android :: Gallery Widget - Focus And Selection Gone?

Aug 26, 2010

I'm trying to realize how the focus and selection in the Gallery widget is doing their job. I'm facing weird situations when trying to update information (TextViews and Spinner) upon a selected item in the Gallery. The focus and selection is lost. So, using the resource gallery_item_background will end in showing the "unselected" background for the current selected image. I have used the .xml that came with the android sdk, and I can't realize how this is happening. I have set setFocusable(false) and setFocusableInTouchMode(false) to all other Views to try out (and true for the Gallery) without any luck.

I have also add 'in-situ' debug, that is, a menu that updates differents widgets when onItemSelected() is called. So I can see while using the application how the background resource is applied. When set to 'no update' the obvious thing happens. None of the widgets are updated with new values, and the background resource works as expected. When set to 'manual update' (an update in the listener that do: .setText() on the textview) does work depending the current View that is showing the TextViews (I have a ViewFlipper that display 2 differents Layout of the TextViews)...............

View 2 Replies View Related

Android :: Move Homescreen Focus To Specific Widget?

Nov 10, 2009

I'm writing a appwidget and hope to limit a widget can be added only once on homescreen, and for further trying, i hope to show the correct page of homescreen to show the widget, just like native media player widget.

View 2 Replies View Related

Android :: Detect When Widget Gained / Lost Focus

Aug 13, 2010

What's the best way to detect when a Home Screen Widget has gained or lost focus? An example of losing focus is if the user navigates to another screen or if another screen popped up in front of the Widget.

View 1 Replies View Related

Android :: Drawing Focus Highlight In Custom Widget

Jul 6, 2009

I have made a custom widget, very similar to JTable in Swing. It is not editable, and all data is replaced at once, allowing easy checking for the widest item in each column & custom col sizing at replace time. It is a subclass of LinearLayout, filled with re-usable TableRow Objects, sub-classed directly from View.

TableRow is both Clickable, focusable, & focusable In Touch Mode. TableRow overrides onDraw(Canvas), calling super. It draws the first column in Black with Lt gray underneath. If the TableRow isFocused () , then a filled rectangle is drawn, before the rest of the cols (left or right justified based on data type), and borders. Where do I get the color, orange, to draw the filled rectangle indicating focus? android.R.drawable.list_selector_background seems to be a pointer, value 17301602, not an actual color. Placing any real Color in my code draws things fine. Is this 17301602 transparent or something? Am I doing this wrong, or do I just need to know how to fine the orange?

View 2 Replies View Related

Motorola Droid X :: Auto Focus - Click To Focus

Aug 29, 2010

I loved the camera on the Eris and the Incredible, not only did they have a whole lot more of a crisp high-res detail, the auto-focus absolutely rocked. With my droid x, I can be getting a little artsy and focus on an object with the crosshair but it'll take me 20 tries to get it to lock on, its insane, I know I'm not getting too close to my subject because it will definitely eventually focus on that object if I try over and over and over again. It's not just close ups that I find myself and my buddy with this issue either. macro shooting mode does not help. My buddie's droid X has the same exact behaviors. Eris and incredible just LOCKED ON first try with even very low contrast / detail subjects, on top of that, have a ton better camera GUI when it comes to "click to focus". I know this thing ain't no SLR but, blows me away of how terrible the camera performance is vs. the HTC android based devices. Ihink motorola will fix this? I know this thing ain't no SLR but it just blows me away how the HTC android devices camera performance (except for video) blows the Droid X away.

View 9 Replies View Related

Android :: Focus Not Going To Another Button

Jun 9, 2010

I wrote a code for pinging of given URL.It works fine for me.But whenever i clicked on the start ping button, pinging started but that time focus always is on start button and no widget of the screen working that time. After pressing many times it will gives the force close error.If iam giving URL which is not pinging then that time , all the widgets are working fine.After some time i need to stop the pinging by using my stop button.But it is not working.Please give me advise.Iam using Runtime.exec() for ping command in my android.

View 2 Replies View Related

Android : How To Set Focus On List?

Sep 9, 2010

I display a list on screen, how could I set focus on one list item? It seems in touch mode, it is impossible to set focus. Am I correct?

View 2 Replies View Related

Android :: Next Focus And Soft Keyboard

Apr 24, 2009

I have a form that is working fine with the "Next" flow order when using the computer keyboard with emulator (and probably with the keyboard on the G1) but not with the SoftKeyboard with 1.5.Some fields indicate "Next" with this keyboard, some go to the correct field and others don't.Two of the fields are text and they only give a carriage return instead of "Next."My numeric fields give the proper "Next" key. Use of the SoftKeyboard is a little underdocumented so far (if there is a hidden doc online somewhere please provide me a link to it). There are also some added fields under 1.5 that I have asked about previously but received no answer.These appear to have something to do with the Soft Keyboard.Though these can be set programmatically I haven't seen the proper way to set these flags using XML. This field is the one that replaces "Numeric" which deprecated.

View 3 Replies View Related

Android :: How To Prevent EditText From Getting Focus?

Feb 15, 2010

How can we prevent an edittext from getting focus and displaying the soft keyboard. I have an searchbox which should not be focused by default and should have focus only when user clicks on it to enter something. But right now it takes focus and shows the keyoard as soon as I open the activity. Is this a bug or can this be changed to behave in the way we want?

View 2 Replies View Related

Android :: Newline Characters And Focus

Aug 17, 2010

Currently I have an edittext field that when the user presses enter it does mostly what I want it to, validate an IP Address format and inform the user if it is wrong. How do I make it so when the user presses enter it checks it like it is supposed to be does not enter the newline character?

Here is my code for it.
public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {
if(validateIPaddress(m_etIPAddress.getText().toString())){
ConfigData.m_IPAddress = m_etIPAddress.getText().toString();
} else { showAlertDialog("Invalid IP Address
Example: 255.255.255.255 0.0.0.0","Error: ");
m_etIPAddress.setText(ConfigData.m_IPAddress);
m_etIPAddress.requestFocus();
} return false;
}

Another problem I have is that in the false condition of the validation, that it will not bring up the soft keyboard to allow the user to reedit that text field. If the user clicks on another edit text the window gives it focus, and allows the user to edit the second text field while still maintaining the 'green outline' around the original edittext.

The EditText still creates a newline. I tried calling that when I create the EditText and it shows the dialog then inserts a newline character at the beginning which is weird because the
m_etIPAddress.setText(ConfigData.m_IPAddress);
Should automatically overwrite anything in that field to the static IP saved within ConfigData. (my settings class) and I think the focus might work, the problem is that after requestFocus, that EditText shows it has focus but is unresponsive. I can click on other EditText's and modify them, while it still shows the focus outline on the IP EditText. If I click on the IP EditText it doesn't actually do anything. Its kind of strange.

View 1 Replies View Related

Android :: Set Focus On Running Activity

Mar 24, 2010

I have an Activity that keeps running after the Home button is pressed (naturally) and of-course the focus is in the home screen, and when the running process ends I need to restore the focus on that activity. In more PC expression, I need to maximize the application.

View 1 Replies View Related

Android :: AutoCompleteTextView - Passing Focus And 1.6

Nov 15, 2009

Has anyone noticed that AutoCompleteTextView doesn't pass the focus to the next field when you tap on "NEXT" button on soft keyboard? And it's all happening on Android 1.6. v1.5 works flawlessly! Is there any known solution for this?

View 3 Replies View Related

Android :: Recruiting For Focus Group

Jun 23, 2010

I am taking a marketing research class and our topic is on smartphones. We need to do a focus group for this project and the report is due VERY soon. We had much difficulty finding people with android phones here in vancouver so it would be much appreciated if you guys can help! The focus group will likely take place on msn either on Friday or Saturday around 5pm. If you are not available for a focus group, I can always interview you individually through skype/msn/phone/email. You can contact me at my email: mmi@sfu.ca or reply to this thread!

View 6 Replies View Related

Android :: Set Initial Focus In Application

Apr 30, 2010

In my android application it automatically focuses the first Button I have in my layout, giving it an orange outline. How can I set the initial focus preferably in XML, and can this be set to nothing?

View 1 Replies View Related

Android :: Set Focus On Any Item Of Listview

Jul 2, 2010

Now i want the first item of the list to be automatically focused when i launch the application How can i set the focus on any item of the list when i click on the some other view for example a button?

View 1 Replies View Related

Android :: Focus The Developer Emulator?

Aug 3, 2010

I made an image button in eclipse and I tested it out (ran it) with the emulator in the android sdk package.

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/cat1" /> <!-- pressed -->
<item android:state_focused="true"
android:drawable="@drawable/cat2" /> <!-- focused -->
<item android:drawable="@drawable/cat3" /> <!-- default -->
</selector>

Pressed and Default work with the mouse, but how do you focus it? Or if you can't, do you need to get an android phone?

View 1 Replies View Related

Android :: Get Focus To GridView First Image?

Aug 25, 2010

Iam writing GridView by using BaseAdapter with 2 columns.Each column with One Image and Text.It works smoothly.I had given focus by using below code in onConfig...

public void onConfigurationChanged(Configuration newConfig) {
gridview.requestFocusFromTouch();
gridview.setSelection(0);
}

It works when my view configuration changes.But Same doesn't work in onCreate() method.I used below all methods in onCreate() but my view doesn;t get focus.How to give focus for the first image when running my application.I want focus on first image when view inflates on the device.Please give me guidance?................

View 1 Replies View Related

Android :: Regaining Focus Using SurfaceView

Mar 23, 2009

I'm currently getting to grips with Android, playing around with the Lunar Lander sample. I've found that if you navigate away from the app (eg, hit the call button) it will destroy the underlying surface (calling surfaceDestroyed). Navigating back (which will trigger onWindowVisibilityChanged) the app will crash, as it will try to draw to the surface without recreating it. Is there some code I can put in onWindowVisibilityChanged (or anywhere else) that will regenerate the SurfaceView's underlying surface and resume execution nicely? It feels like this should be a simple function call but I can't find anything in the API docs.

View 2 Replies View Related

Android :: Receiving Focus On List

Feb 24, 2010

I have the following XML layout for a ListActivity.

<?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">
<ListView android:id="@+id/android:list" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:id="@+id/android:empty"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:text="No Contacts" />
</LinearLayout>

My problem is that if I have focus on any of the header ImageButtons then when pressing down with the dpad the list get focus on its 7th row (depending on row height), and not on the first row. I've seen the same behavior on Fring application, under Contacts. I tried by listening for the OnKey event for the KeyEvent.KEYCODE_DPAD_DOWN and triggering a implicit focus on the first item of the list, but I don't know how to do it either.

View 1 Replies View Related

Android :: Camera Focus Facility

Jan 20, 2009

My app is struggling to take focused shots. Is there a built in facility that sets an auto-focus property on the camera, so it automatically takes clear and focused images. I've noticed that feature in numerous well-known apps such as ShopSavvy, CompareEverywhere, etc. Could you advise on how to achieve that?

View 6 Replies View Related

Android :: Check Within App Button On Focus?

Aug 10, 2009

I have a set of buttons. Usually i can also move between em also with my trackball. But now I have set styles on my buttons and I don't see anymore if a button is focused. What can I do, is there a specific Styles Tag that I can use till now i use: code...
is there something i can check within my App if a button comes focused so i can highlight em manual?

View 2 Replies View Related

Android :: TextView - Disable Focus / Fix It

Jan 30, 2010

I have a listview, and wanted to make some list items to be non-focusable. i.e On pressing the down-arrow key, some items in the middle of the list gets skipped.

I tried the following method. 1. created separate ArrayAdapter class. 2. override getView method. 3. In getView, I called setSelected(false) and also tried setFocusable(false) for some items, but its not working.

View 2 Replies View Related

Android :: Focus Control In A ListView

Feb 21, 2009

The context: I want to have a ListView that wouldn't receive focus (e.g. won't highlight row when user touches it). Yet each row widget has it's own OnClickListener.

Here's what I specify in layout xml:

CODE:.................

The ListView still behaves exactly the same. the interrelation between the three what's the right way to create a ListView that doesn't receive focus?

View 2 Replies View Related

Android :: Focus Next Textview Automatically?

May 31, 2010

I have a TextView with android:maxLength set to 3 and another with android:maxLength set to 7.
I want focus to automatically move to the second TextView once the 3 chars of the first TextView are filled up. Is this possible without inheriting TextView and writing a custom implementation ?

View 1 Replies View Related

Android Background Running App Focus?

Mar 15, 2012

i am using fileobserver to observe the changes in a folder.Now i want to get focus on my application UI when i create a new file inside that folder(observed). i am able to create event on creation of new file in that folder. But not able to get UI of my application in front.

View 2 Replies View Related

General :: Camera Won't Focus On Android App

Mar 18, 2012

my partner are developing an android app, with camera feature, but seems it doesn't work properly, the camera won't focus and can't capture the picture.I'm not able to post on Android development software.

View 1 Replies View Related

Android :: Activity With Two Elements - Input Focus

Oct 12, 2009

I have an android activity, with two elements:
EditText
ListView
When my activity starts, the EditText immediately has input focus (flashing cursor). I don't want any control to have input focus at startup. Stop EditText from gaining focus at Activity startup? I tried:
EditText.setSelected(false);
No luck. How can I convince the EditText to not select itself when the Activity starts?

View 5 Replies View Related

Android :: Multiple EditText Controls And Focus

Jun 9, 2010

I have an activity with two edittext controls. I am calling the requestFocus on the second edittext field since by default the focus goes to the first edittext control. The focus appears to be in the second edittext field (the second one gets the highlighted border), but if we try to enter any characters using the hardware keyboard the text appears in the first edittext control.

View 1 Replies View Related

Android :: How To Remove Focus From Single EditText?

Oct 8, 2010

In my application I have a single EditText together with some TextViews, button and a spinner. My EditText receives focus since it is the only focusable view in this activity, I believe. My EditText shows with an orange border and cursor on the field. Now I would like to remove the focus from this field (I don't want the cursor and border to show). Is there a way to do this? I have been able to focus on the button by doing button.seFocusableInTouchMode() and button.requestFocus(). But this highlights the button and is obviously not what I want.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved