back

Need assistance using phones back button to go back in Webview

你离开我真会死。 提交于 2019-12-05 07:40:56
This is my code: package com.testappmobile; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.Window; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; public class testappmobileActivity extends Activity { final Activity activity = this; private WebView webview; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // Check if the key event was the BACK key and if there's history if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) { webview.goBack(); return

What is the ID of the back arrow drawable in the ActionBar?

試著忘記壹切 提交于 2019-12-05 05:34:41
The following code causes a back arrow to appear in the ActionBar: getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); I'm looking for the resource ID of the arrow drawable, i.e. android.R.drawable.xxx. The reason I need this ID is so that I can manually set an identical arrow (size & colour) elsewhere in my app. I tried making my own drawable and using that but the size was different from the one in the ActionBar. If you have the support library in your project, you can make a back button in any place in your applicaction like this:

ios7 new pan gesture to go back in navigation stack does not clear tableview selection

落花浮王杯 提交于 2019-12-05 02:37:05
I have a Notes-like app: uitableviewcontroller showing up individual notes by pushing them onto navigation stack). And I decided to use an ios7 Back button and a pan gesture recognizer coming with it. My only modification is removing text from the button by setting navigationItem title of the from-controller to an empty string before pushing the detail-view-controller, as it is advised at https://stackoverflow.com/questions/18870128/ios-7-navigation-bar-custom-back-button-without-title The button itself works just fine, but when I am going back from my note to the notes table view by means of

Back Button on UIWebView

余生颓废 提交于 2019-12-05 02:17:10
I'm trying to figure out how to create a back button that allows the user to go back one page. I read through Apple's Docs (which still go way over my head) and found out that I need to setup the canGoBack and goBack 's. I have tried this, but for some reason it is not working. My UIWebView is named viewWeb , and I created and attached an outlet to my Back button, named backButton , and also tagged it as 1. Here is my code that I wrote in the View Controller: // Back button: -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { [

Bring task to front on widget click

狂风中的少年 提交于 2019-12-04 20:59:53
I sent a task (activity) to back with: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); moveTaskToBack(true); } but I need bring it to front by setOnClickPendingIntent in widget. Just start the main (root) activity of your application like this: Intent intent = new Intent(context, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); If the activity is already running in a task, this will just bring that task to the foreground (without creating any new

Android back button problem

被刻印的时光 ゝ 提交于 2019-12-04 20:44:35
Say I have 3 Activities in my application: A, B and C. The flow though the application is: A -> B -> C. Once at C, pressing the back button will take the user to B. If the user presses the back button another time they got to A, and finally if they press it one more time, they exit the application. Objective: When the user presses the back button on C, they should go to A and not B, and if they press it another time, they exit the app. Problem: When overriding the back button on Activity C to launch Activity A everything appears to be ok. However if the user presses the back button again, they

How to go to previous page in task flow using 'BACK' button in browser?

三世轮回 提交于 2019-12-04 17:13:22
I have created system using ADF application that can detect 'BACK' button in the browser(e.g. firefox and google chrome).Everytime i click the 'BACK' button in the browser,it will prompt out message that ask user whether want to 'stay in the current page' or 'leave the page'. Once i click 'leave the page' it will take me to the login page. Is there any possibility for go back to previous page in task flow when user click on browser's back button? By the way, the task flow is in the page fragment. can anyone tell me how to do it?Need this step urgently.. Thanks in advance. The browser back

Back to the App after call

安稳与你 提交于 2019-12-04 15:10:42
问题 i'm trying to make a phone call from the app and I want it to return back to the app after the call i asked that question in this forum but i didn't understand the answer How to make a phone call in android and come back to my activity when the call is done? public void call() { try { Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:048598077")); getContext().startActivity(callIntent); } catch (ActivityNotFoundException activityException) { Log.e("dialing

Implementing a “conditional” back button in ember.js

断了今生、忘了曾经 提交于 2019-12-04 13:14:15
问题 I am working on an ember.js (version 1.2) based mobile application and I am trying to find the most idiomatic way of implementing the global menu toggle/back button pattern that is common in many mobile apps. Specifically, its a button that sits on the left side of a fixed-top toolbar, which toggles a hidden drawer main menu when the user is at the app's home/index view, however upon moving into a sub route, the button displays a back arrow, and when clicked, it takes the user back to the

Android Webview with Back Button, if else

点点圈 提交于 2019-12-04 09:31:01
问题 Disregard. I was opening the wrong app that was installed. It works wonderfully. :) I have the back button working correctly within my webview, but I was wondering something. How to make the webview go back until it cannot anymore, and instead of exiting the program, have it open up a dialog box asking if the user is sure they won't to exit. Here is my take on the code. Thanks for taking the time. .java file package com.vtd.whatthe; import android.app.Activity; import android.app.AlertDialog;