Skip to main content

Home/ Android Dev/ Group items tagged exception

Rss Feed Group items tagged

2More

javadoc注释规范 - kelaocai - JavaEye技术网站 - 0 views

  • /** * show 方法的简述. * <p>show 方法的详细说明第一行<br> * show 方法的详细说明第二行 * @param b true 表示显示,false 表示隐藏 * @return 没有返回值 */ public void show(boolean b) { frame.show(b); }
  • javadoc 标记由“@”及其后所跟的标记类型和专用注释引用组成 javadoc 标记有如下一些: @author 标明开发该类模块的作者 @version 标明该类模块的版本 @see 参考转向,也就是相关主题 @param 对方法中某参数的说明 @return 对方法返回值的说明 @exception 对方法可能抛出的异常进行说明 @author 作者名 @version 版本号 其中,@author 可以多次使用,以指明多个作者,生成的文档中每个作者之间使用逗号 (,) 隔开。@version 也可以使用多次,只有第一次有效 使用 @param、@return 和 @exception 说明方法 这三个标记都是只用于方法的。@param 描述方法的参数,@return 描述方法的返回值,@exception 描述方法可能抛出的异常。它们的句法如下: @param 参数名 参数说明 @return 返回值说明 @exception 异常类名 说明
2More

Widget(s) and Pending intent - Android Developers | Google Groups - 0 views

  • Then i've tried PendingIntent.FLAG_UPDATE_CURRENT i'm no longer crashing, but it always launches the activity with extras were put in the widget that was updated the last. It looks like pending intent is shared among my widget instances
  • I've changed the call to  PendingIntent pending = PendingIntent.getActivity(context, appWidgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT); Now everything is cool except based on discussions i'm not sure how reliable it'll be . ( Doc says it's not supported yet )
1More

Selecting text in a WebView? - Stack Overflow - 1 views

  • From the class that extends WebView: public void selectAndCopyText() {    try {        Method m = WebView.class.getMethod("emulateShiftHeld", null);        m.invoke(this, null);    } catch (Exception e) {        throw new AssertionError(e);    }} And then you have to use ClipboardManager to watch for new text. P.S. Historical note: this hack is based on Android 1.5 WebView implementation.
2More

attempt to acquire a reference on a close SQLiteClosable - Android Developers | Google ... - 0 views

  • If you're managing the cursor yourself the cleanest way to go is probably this: Cursor cursor = getContentResolver().query(...); try {     // read from the cursor and do stuff } finally {     if (cursor != null) cursor.close(); }
  • Another option if you still want to use Activity.managedQuery() is to get your information and then: stopManaging(cursor); cursor.close(); Cheers, Justin Android Team @ Google
1 - 5 of 5
Showing 20 items per page