In my android app, I want to show a spinner in my activity when a user clicks login button after entering the details.The spinner should appear only till the login process is validated in the background. After it is done, then the spinner should disappear and the user should be taken to the desired activity.
I think you might have trouble finding this because in Android the 'Spinner' name is already taken for another control. What you are looking for is an Activity Circle in the form of a ProgressBar. Maybe these SO questions will be of help to you:
Show activity circle before loading webview - Android
how to show progress bar(circle) in an activity having a listview before loading the listview with data
Related
Problem:
How would I refresh Spinner data in a MainActivity through the use of the ToolBar back arrow or phone "back button?"
What I am trying to do (would like to do):
Right now, clicking the toolbar back arrow or back button just takes me back to the MainActiity previous state... which is expected behavior without any activity updates. What I wanted to do was trigger some updates to the Spinners in the MainActivity.
How the app spinners function (High-Level):
In my MainActivity are two Spinners called Topic and Question used to return results on the choices made and the user clicks on the results returned to take them to other activities. In later activities, the list data used in the spinners may have been updated or changed. For example, a Topic may have been added or removed. So, when the user eventually returns to the MainActivity, I would like for that list to be updated.
What I have done:
My thought was I would need to use the toolbar arrow or phone back button OnClick with an Intent. Truthfully, both the arrow and button have to function the same in this respect. Unless someone thought there was a better solution, which I'm open to, this was my solution for updating the spinners in the main activity. I was struggling to find how this may be done with the ToolBar arrow and the Back Button.... and whether that was the right solution. I would like to avoid creating a menu button to do the same if I can use the arrow and back buttons.
Below are 3 images demonstrating how this works. Image 1, the user chose a Question to return a result. Image 2 is the result with the Question edited. In image 3, the Main Activity spinner retains the old list and value and there is no result because the question was changed and there is nothing to return for this question value now.
Question choice and result
Question was edited by user
Old question list value remains - there's no result due to the change
I have a situation where the search box can be anywhere on the screen, once the user select the search box, i want show the Search Suggestion fragment on full screen, i populate the suggestion list as the user types in, on done i want to close the fragment and populate the selected text on the search box, similar to google PlaceAutocompleteFragment. what are the building blocks i need? thank you in advance, this is my first question sorry if there are any formatting issue in my question
Was able to do it by designing transparent screen with EditText on screen. and start activity for results on Parent activity EditText onfocus
I m making book finder app.
step1: i clicked on search button and activity is waiting for my book title
step2: i input some book title
step3: the focus still stays on this search button, i have to click on screen to make it go away.
is there way to automatically loose focus on last widget i clicked on?
You probably just want to call requestFocus() on your book list whenever a search completes (however, if there are no results, you may want to re-open your search box, or do so after a delay). There is also a OnFocusChangedListener which might be of help if requesting focus on your list after serving up results does't work for some reason.
I am implementing pop up screen .But when i click a button My pop up is show .But when i click the field which is present on pop up screen .it show keyboad
along with my background image .I didn't add any background image on that page .I only add background image on different pages but it is show in that page when i scroll the pop up screen
i don't provide my code because it too large.Can you please idea how it is possible .actualy i check on browser it is working fine problem is android device!
This is not a image. Actually jQueryMobile adds a border to the active input field. You can change this via CSS. Please see the link jQuery Mobile border on select text input
It is not an image those lines are the lists that are created automatically for some reason you can check there will be some code for it in your code put it on git.
I’ve created a search activity in my app, in the standard Android way, without custom suggestions. When a user starts typing text or presses the search button, they get a search dialog with search box, something like figure 1 from here:
http://developer.android.com/guide/topics/search/search-dialog.html
You’ll notice in the background is the previous activity, the words “abide”, etc.
My problem is that the previous activity is shown clear as day behind the search dialog, and its confusing for users, because users think all that is still active, and they try to press on it, but it just cancels the search dialog. And it distracts the user from the search task (are those search results, they may wonder?).
Question: how to blur (make out of focus) or darken the previous activity?
I actually see this in some app’s search screens.
I found a simple way to blur the background of the search dialog:
Basically it's just adding a (half) transparent view over the ListView (or what is under the dialog) and hide it by default. If the search dialog appears (calling onSearchRequested()) it is set to visible, if it disappears it's set back to gone (invisible).
Check out the details at my blog: http://mavistechchannel.wordpress.com/2011/08/13/blur-background-android-search-dialog/
Assuming you got dialog from a Dialog.Builder, use the following:
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);