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 异常类名 说明
How to update the GUI in Push/C2DM sample from advandroid book? - cw-android | Google G... - 0 views
-
> Now I just want to update the GUI from this method. > Can I somehow call a method in PushEndpointDemo.java? No, for two reasons: 1. Because C2DMReceiver is a manifest-registered BroadcastReceiver and therefore has no access to any activities 2. There might not be an activity, since you have no control over the timing of when the C2DM message is received (e.g., the user pressed BACK, the user pressed HOME) > Do I need a Broadcast Intent to do this? Possibly. -- If you want to update an activity or else ignore the message, have C2DMReceiver send out a private broadcast, picked up by a receiver registered via registerReceiver() in the activity -- If you want to update an activity or else raise a notification, have C2DMReceiver send out an ordered broadcast, as described here: http://commonsware.com/blog/2010/08/11/activity-notification-ordered-... -- If you want to update a database, call startActivity() on an IntentService, and have it do the database I/O, plus possibly broadcast an Intent to update an activity/raise a notification.
The CommonsBlog - Activity or Notification via Ordered Broadcast - 0 views
-
I’ve run into the following generalized question a lot recently: I have an event that occurs in the background. I want to update my activity, if the activity is on the screen. Otherwise, I want to raise a Notification.
-
Hence, the recipe for the activity-or-Notification pattern is: Define an action string you will use when the event occurs that you want to go to the activity or notification (e.g., com.commonsware.java.packages.are.fun.EVENT). Dynamically register a BroadcastReceiever in your activity, with an IntentFilter set up for the aforementioned action string and with a positive priority (the default priority for a filter is 0). This receiver should then have the activity do whatever it needs to do to update the UI based on this event. The receiver should also call abortBroadcast() to prevent others from getting it. Be sure to register the receiver in onStart() or onResume() and unregister the receiver in the corresponding onStop or onPause() method. Register in your manifest a BroadcastReceiver, with an <intent-filter> set up for the aforementioned action string. This receiver should raise the Notification. In your service (e.g., an IntentService), when the event occurs, call sendOrderedBroadcast(). And that’s it. If the activity is on-screen, its receiver will be registered, so it will get the event, process it, and cancel the broadcast. If the activity is not on-screen, its receiver will not be registered, so the event will go to the default handler, in the form of your manifest-registered BroadcastReceiver, which will raise the Notification.
Android Dev Phone, Ubuntu and VMWare Server : Johan de Koning - 0 views
-
Create a new file (as root) sudo gedit /etc/udev/rules.d/50-android.rules with the following content SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" Make sure that the text after {idVendor} is the same as the device id found when using the lsusb command. Save and exit the editor To make execution of the rule possible, perform a chmod sudo chmod a+rx /etc/udev/rules.d/50-android.rules To make the rule active, restart udev sudo /etc/init.d/udev restart
-
You can perform a check, to see that the Android Dev Phone is shared with Ubuntu, by opening a Terminal (inside Ubuntu. Open a VMWare Remote Console to make use of the Ubuntu) and type the following command lsusb A list of USB devices will be shown. For example: Bus 002 Device 001: ID ld6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp. Bus 001 Device 001: ID ld6b:0002 Linux Foundation 2.0 root hub
Application Fundamentals | Android Developers - 0 views
-
passes
-
When onReceive() returns
-
by the system at any time
- ...13 more annotations...
[筆記]讓Android emulator連intranet « 更夜 - 0 views
-
[通用部分] 如果開了一個以上的模擬器的話請自行加adb參數 0a. 先adb pull /system/etc/hosts hosts抓回local來修改。 0b. 在原本的 127.0.0.1 localhost 加上新的行,寫入你需要的對應如 192.168.1.15 mytestsite,存檔。 1. adb remount (才不會發生Read-only file system錯誤) 2. adb push hosts /system/etc/hosts
-
[2.0.1, 2.1 only] 這兩個版本會在這邊丟出錯誤訊息,分別為 failed to copy 'hosts' to '/system/etc/hosts': No space left on device failed to copy 'hosts' to '/system/etc/hosts': Out of memory 解決方法是,開啟模擬器時不要直接從 AVD Manager介面開,請下指令: $ emulator -avd youravdname -partition-size 128 接著再對這個模擬器使用上面的 hosts修改大法就不會出現錯誤了。 partition size的單位是MB,預設似乎是64。從adb shell 用 df 指令觀察的結果,/system 和 /data 都會被這個設定成這邊指定的值。而1.5, 1.6 的 image 因為剛好沒超過 64MB,還剩下一點空間,所以 hosts 還寫得進去,而 2.x 的 image 有 七萬多K,mount之後 /system 這個 partition 看起來就是全滿,剩下空間 0K。因此 hosts變肥後無法寫入,真的是因為partition爆了。事實上正常的手機確實也不需要留空間給user hack…模擬器還讓我們調參數已經很偷笑了,可惜AVD Manager 的 Start 沒地方可以設定 partition size。若有此需求的話只好麻煩一點手動下指定開emulator囉。
Authenticating against App Engine from an Android app - Nick's Blog - 0 views
-
Authentication with App Engine, regardless of where you're doing it, is a three-stage process: Obtain an authentication token. This can be done with ClientLogin for installed apps, for example, or with AuthSub for a webapp. When logging in directly to an application, this is the part of the login process where your user sees a Google signin screen. Take that authentication token, and use it to obtain an authentication cookie. Use that authentication cookie in all subsequent requests.
-
<uses-permission android:name="android.permission.GET_ACCOUNTS"></uses-permission> <uses-permission android:name="android.permission.USE_CREDENTIALS"></uses-permission> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
请教,使用layout_gravity属性不能垂直居中 - China Android Dev | Google Groups - 0 views
-
按我理解,layout_gravity 属性是用于设置View 与其容器的对齐关系的,但实际使用中 却发现 似乎不是这样,请看如下代码: <?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" android:background="#AA009988"> <TextView android:id="@+id/my_view" android:layout_width="220dip" android:layout_height="100dip" android:text="sdfasdfsdfsdf\nsdfjlwjesd" android:background="#889900AA" *android:layout_gravity="center"* /> </LinearLayout> 我为 TextView 设置了 *layout_gravity="center"*- ,本来它应该在父容器中 垂直和水平 居中的,但事实上只是水平居中了,垂直方向并未居中。 我再进一步通过 *layout_gravity="**center_vertical**"* ,但仍然无法垂直居中,请问这是为什么呢?
-
你可以在最外面的 LinearLayout 加上android:gravity="center". Vertical LinearLayout中, layout_gravity 设置成center无法垂直剧中,是因 为container的排版被限制为从上到下, 试想一下,如果按照你的逻辑,假设第一个child layout_gravity设置成bottom, 第二个childlayout_gravity设置成top, 那么第一个就会跑到第二个下面了。 所以, 当你设置整个linearlayout为垂直, layout_gravity中, 只有 left, right, center_ horizontal 管用的。 tj
最封闭的开源系统,话说Android的八宗罪 | ifanr 爱范儿 ♂专注于拇指设备的小众讨论 - 0 views
-
没错,Google 的移动平台是当前最聪明的利用开源来驱动商业议程的实现
-
虽然早期饱受质疑,Google 的 Android 移动平台已经在移动行业得到了营运商和手机厂商的广泛支持,仅剩固执的诺基亚。Android 从 08 年的一款机型发展到 10 年的 50 多款,发展之快让绝大多数的业内观察家们吃惊
-
话说回来,Android 用开源来做市场宣传,非常成功的搅乱了整个行业,导致了诺基亚对 Symbian 的收购以及 Windows Mobile 的全面崩溃(不过译者觉得 iPhone OS 4 的多重任务机制的发布让 WP7 真正成了杯具帝)。不过更重要的是,利用开源的名号和 Google 的魅力,Android 吸引了成千上万的开发者,虽然 Android 并不能让开发者们赚到很多钱,而且 Android 手机的数量不到苹果产品的十分之一(连支持收费的国家都比苹果少6倍)。
- ...3 more annotations...
PackageInfo | Android Developers - 0 views
-
Overall information about the contents of a package. This corresponds to all of the information collected from AndroidManifest.xml.
Build | Android Developers - 0 views
-
Information about the current build, extracted from system properties.
android-pinch - Project Hosting on Google Code - 0 views
-
Adds multi-touch zoom to; ImageViews, WebViews, and MapViews. Simply use the corresponding object in place of the default, and the "pinch" functionality will be usable. Also includes misc. Views which can be useful for development.
Can I Use this Intent? | Android Developers - 0 views
-
This article describes a technique you can use to find out whether the system contains any application capable of responding to the intent you want to use. The example below shows a helper method that queries the system package manager to determine whether there's an app that can respond to a specified intent. Your application can pass an intent to the method and then, for example, show or hide user options that the user would normally use to trigger the intent.
-
/** * Indicates whether the specified action can be used as an intent. This * method queries the package manager for installed packages that can * respond to an intent with the specified action. If no suitable package is * found, this method returns false. * * @param context The application's environment. * @param action The Intent action to check for availability. * * @return True if an Intent with the specified action can be sent and * responded to, false otherwise. */public static boolean isIntentAvailable(Context context, String action) { final PackageManager packageManager = context.getPackageManager(); final Intent intent = new Intent(action); List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); return list.size() > 0;}
-
@Overridepublic boolean onPrepareOptionsMenu(Menu menu) { final boolean scanAvailable = isIntentAvailable(this, "com.google.zxing.client.android.SCAN"); MenuItem item; item = menu.findItem(R.id.menu_item_add); item.setEnabled(scanAvailable); return super.onPrepareOptionsMenu(menu);}
Video And Screenshots Of Android 3.0′s Surprise Appearance - 2 views
Help getting array from arrays.xml file (Android, Eclipse) - Stack Overflow - 0 views
-
I am just trying to display a list from an array that I have in my arrays.xml.
-
String[] testArray = getResources().getStringArray(R.array.testArray); /** Called when the activity is first created. */ @Override protected void onCreate(Bundle savedInstanceState)
-
You can't initialize your testArray field this way, because the application resources still aren't ready.
- ...1 more annotation...
webView load Data problem - Android Beginners | Google Groups - 0 views
-
sagar wrote: > Hello, > I have following code to display webview's background. > wv.loadData("<html><body background=\"file:///android_asset/lbh.png > \">"+data[0],"text/html","utf-8"); > here the data[0] contains the data to be displayed... > Data is displayed fine.. > but background is not displayed. > I can only use this method..i dont knw why i can t access android > assets.. > I have placed that image in assets folder already.. Try loadDataWithBaseUrl() instead of loadData(), supplying some bogus value for the base URL (e.g., fake://why/o/why/is/this/needed).
myandroidwidgets - Project Hosting on Google Code - 0 views
-
A bunch of sample apps for Android. Simple workarounds and examples for doing things on Android. Custom Progress Bar - A customized Progress Bar for android with your own animation Drag and Drop widgets on Android Ongoing notifications on Android HTML with images in a Text View Custom Expandable List Views on Android Custom List View - Phonebook Example Custom Title Bar Android WebView, Javascrip and CSS Unzip files on Android
Vladimir Kroz blog - 0 views
-
Author of "android-active-record": http://code.google.com/p/android-active-record/
« First
‹ Previous
161 - 180
Next ›
Last »
Showing 20▼ items per page