I have written an app which has main activity and app widget.
Dragging the widget to the home screen creates new widgets, as it should. I am looking for the way to do it when the user presses a button in the app activity.
There is no way to put widget on the "Home" screen programicaly.
Related
I need to make custom back button in WebView.
Its any way to get OnBackPress with custom button?
Just have a full screen webview, and i want to make button to going back in the webview.
Thanks.
I'm making an application. I have succeeded in creating a viewFlipper with:
android:flipInterval="5000"
android:autoStart="true"
I've also made two buttons, next and previous, with:
android:clickable="true"
android:onClick="onClick"
I want each button to affect the ViewFlipper, as in when the next button is pressed, the next image is displayed. And, when the previous button is pressed, the previous image is displayed.
What do I need to add to the XML file and what do I need to add to the MainActivity class? Everything I've tried up until now either prevents the app opening or crashes the app when the button is pressed.
Any and all help is greatly appreciated.
I am developing an android app. In this app my main activity has a container to host fragment activity. In my fragment activity I have some editText fields. When I am clicks on one of edit field soft keyboard appears but screen doesn't resize according to current situation. I have tried some suggestions like
android:windowSoftInputMode="adjustResize"
and
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
I am testing at a device which runs MarshMallow OS. What should I do know.
i have a project that is calculator, there is many button and layout above the main layout, i have a history frame that hidden at the right screen, i want that if i swipe the edge of the whole screen and ignore the button and other objects there, the history frame shown
i already read the question here
how to fire an event when someone clicks anywhere on the screen in an android app?
but it didnt work for me
thanks
I solved this problem using dispatchTouchEvent.
I implemented the Sliding Menu library in my app but I have an issue with the navigation.
In the behind view, I've set some buttons which when pressed change the Fragment of my current Activity. Normally, when the fragment is changed, the Activity slides back in it's place.
But I encountered a problem and I am forced to use a new Activity on button click. The thing is that, when I start the new Activity, it opens a new "screen" (as expected). What I want to do is to slide the screen back to it's original position with the new Activity in. Any way I could do that?
Basically, I want to launch an Activity with Drop-Down navigation and 2 normal activities.