Skip to main content

Home/ Android Dev/ Group items tagged guide

Rss Feed Group items tagged

Vincent Tsao

Icons for submenu items doesn't show up - Android Developers | Google Groups - 0 views

  • The fact that sub-menus don't support icons. http://developer.android.com/intl/fr/guide/topics/ui/menus.html <http://developer.android.com/intl/fr/guide/topics/ui/menus.html> *Icon Menu * This is the collection of items initially visible at the bottom of the screen at the press of the MENU key. It supports a maximum of six menu items. *These are the only menu items that support icons* and the only menu items that *do not* support checkboxes or radio buttons.
  • Try to use PopUpWindow <http://developer.android.com/reference/android/widget/PopupWindow.html>class. Here you have an example<http://www.anddev.org/how_to_create_a_popupwindow-t1259.html>
Simon Pan

In-app Billing Overview | Android Developers - 1 views

  • nonce
    • Simon Pan
  • launches the pending intent
  • checkout flow finishes
  • ...22 more annotations...
  • sends your application a notification message
  • you must send a confirmation
  • will continue sending IN_APP_NOTIFY messages
  • should not
  • until you have delivered the item to the user.
  • will still receive an IN_APP_NOTIFY broadcast intent
  • must be able to handle IN_APP_NOTIFY messages
  • references a specific request ID
  • is installed
  • reinstalled.
  • even though you never initiated the purchase.
  • must handle
  • it usually stops sending IN_APP_NOTIFY intents
  • even though your application has sent a CONFIRM_NOTIFICATIONS message. This can occur if a device loses network connectivity while you are sending the CONFIRM_NOTIFICATIONS message.
  • You can do this by checking the orderID
  • even though your application has not sent a REQUEST_PURCHASE message.
  • may receive
  • informing the application that there is a purchase state change.
  • This applies only to items that have their purchase type set to "managed per user account."
  • signs the JSON string that is contained in the PURCHASE_STATE_CHANGED
  • it includes the signed JSON string (unencrypted) and the signature.
  • you can use the public key portion of your RSA key pair to verify the signature.
Kiran Kuppa

A Visual Guide to Relative Layouts In Android » Mark Lapasa - 0 views

  •  
    " I will walk through the 4 kinds of Relative Layout use cases. 1.Target view position in relation to parenting View Group (i.e. a layout container) 2.Target view alignment in relation to parenting View Group 3.Target view position in relation to another View 4.Target view alignment in relation to another View We'll use Jack and Jill buttons to demonstrate this. The first two categories are in relation to a parent layout (Jack and the parent view group). The last two categories show laying out in relation to another View (i.e. Jack + Jill)"
Vincent Tsao

Mark Murphy | AndroidGuys - 0 views

  • Mark Murphy is the founder of CommonsWare and is the author of _The Busy Coder's Guide to Android Development_, _The Busy Coder's Guide to *Advanced* Android Development_, and _Android Programming Tutorials_.
  •  
    Articles from Mark Murphy
Vincent Tsao

用google adsense的小心了!!!! - China Android Dev | Google Groups - 0 views

  • google最后给的判决书: Hi, After further review from our abuse team we have confirmed that your account that was closed was modifying the ad behavior which is strictly prohibited as stated in the AdSense policies. These types of violations pose a significant risk to advertisers and for this reason we can no longer work with you through any partnering AdSense account or product offering. This will be the final communication about this issue. Please do not reply to this email as you will not receive a response. Thank you for your understanding. Google AdSense 我们自始至终都不知道原因。
  • 我Google了下 "modifying the ad behavior " 就是指你修改了 Google提供的 adsense js code 或者 sdk 唯一有可能的就是这里了 GoogleAdView adView = (GoogleAdView) activity.findViewById(R.id.ad<http://r.id.ad/> ); if (adView != null) { View vc = adView.getCurrentView(); if (vc instanceof WebView) { ((WebView) vc).destroy(); } View vn = adView.getNextView(); if (vn instanceof WebView) { ((WebView) vn).destroy(); } } 因为用了adsense之后 我们的程序老是crash 从stack trace看是因为Google adsense sdk 引起的. 资源没有释放. 然后去Adsense的那个mail list AFMA 问了 碰到2个都有同样问题的 然后有人给了个code 因为adsense sdk没有destroy ad view  所以要手动destroy下 我们就在每个有ads的activty的 onDestroy 加上这段 就好了 程序没有crash了 结果就被搞了 连负责我们android adsense sales都事先不知道 adsense team就直接把我们封了 还在beta 测试阶段的东西 还有bug  我们只是加了这个保证他资源正常释放不会影响到我们程序 结果就挂了 而且Google的态度巨NX无比 连个申述的途径都没有  只是给了个link类似事后调查
  • 我刚刚给我的sale发了一封信: Hi Sunil, It has been long that I haven't talked to you. I have a question, when I went to the application register page, I found the page layout was changed and some of my apps were gone. For example UK TV Guide, Australia TV Guide, etc. Also, the published status are all "false". I am confused because I am still seeing my ads are clicked in the daily report. Is there anything wrong? I am nervous because I just knew that an AdSense developer's account was disabled without any warning,  and the developers themselves don't know the reason. I don't want that happened on me so I really appreciate your comment. below is the letter in AFMA group. Looking forward to your reply. Thanks. Cheers, Luke 接下来我引用了superdroid的信。看看他怎么说吧。
  • ...1 more annotation...
  • 把这句抄下来了,大家以后小心了。 Ad Behavior AdSense code may not be altered, nor may the standard behavior, targeting or delivery of ads be manipulated in any way that is not explicitly permitted by Google. For instance, clicking Google ads may not result in a new browser window being launched. 我猜是不是可以找google总部投诉一下这个部门
Vincent Tsao

Fragments | Android Developers - 1 views

  • If you add multiple changes to the transaction (such as another add() or remove()) and call addToBackStack(), then all changes applied before you call commit() are added to the back stack as a single transaction and the BACK key will reverse them all together.
    • Vincent Tsao
       
      what's the point to provide such  mechanism?
  • The most significant difference in lifecycle between an activity and a fragment is how one is stored in its respective back stack. An activity is placed into a back stack of activities that's managed by the system when it's stopped, by default (so that the user can navigate back to it with the BACK key, as discussed in Tasks and Back Stack). However, a fragment is placed into a back stack managed by the host activity only when you explicitly request that the instance be saved by calling addToBackStack() during a transaction that removes the fragment.
  • In some cases, you might need a fragment to share events with the activity. A good way to do that is to define a callback interface inside the fragment and require that the host activity implement it. When the activity receives a callback through the interface, it can share the information with other fragments in the layout as necessary.
  •  
    好特別、好酷的一個類
Simon Pan

App Widgets | Android Developers - 1 views

  • To find your minimum width and height in density-independent pixels (dp), use this formula: (number of cells * 74) - 2
    • Simon Pan
       
      why i can't highlight?
    • Vincent Tsao
       
      FYI: You may need a toolbar to highlight, http://www.diigo.com/tools/toolbar
  • how often the App Widget framework should request an update from the AppWidgetProvider by calling the onUpdate() method
  • exactly on time
  • ...6 more annotations...
  • programmatically interface with the App Widget, based on broadcast events.
  • programmatically interface with the App Widget, based on broadcast events.
  • programmatically interface with the App Widget, based on broadcast events.
  • only the event broadcasts
  • when each App Widget is added to a host
  • it includes a loop that iterates through each entry in appWidgetIds,
Vincent Tsao

Widget Design Guidelines | Android Developers - 1 views

  • In portrait orientation, each cell is 80 pixels wide by 100 pixels tall (the diagram shows a cell in portrait orientation)
  • In landscape orientation, each cell is 106 pixels wide by 74 pixels tall.
Vincent Tsao

Search | Android Developers - 0 views

  • Android's search framework provides a user interface in which users can perform a search and an interaction layer that communicates with your application, so you don't have to build your own search Activity. Instead, a search dialog appears at the top of the screen at the user's command without interrupting the current Activity.
    • Vincent Tsao
       
      我是在实现了一个自己的search activity后看到这篇文章了,oh~shit
Vincent Tsao

Using the Android Search Dialog | Android Developers - 0 views

  • If your data is stored in a SQLite database on the device, performing a full-text search (using FTS3, rather than a LIKE query) can provide a more robust search across text data and can produce results significantly faster.
  • If your data is stored online, then the perceived search performance might be inhibited by the user's data connection. You might want to display a spinning progress wheel until your search returns.
  • <?xml version="1.0" encoding="utf-8"?><searchable xmlns:android="http://schemas.android.com/apk/res/android"    android:label="@string/app_label"    android:hint="@string/search_hint" ></searchable>
    • Vincent Tsao
       
      这个地方一定要记得在string.xml文件中定义label,并在此处refrence定义好的label key。直接在里面写value是不会work的,得出这个结论我花了2个小时!
    • Vincent Tsao
       
      android:label="@string/app_label" 如果我写成 android:label="test", 铁定不能invoke search,不知道为什么Android要区别对待,我认为这是Android的一个bug
Vincent Tsao

RecognizerIntent | Android Developers - 0 views

  • Since: API Level 3
    • Vincent Tsao
       
      这样的话,android 1.5 以上的 OS 都使用这个intent了
  • Constants for supporting speech recognition through starting an Intent
Simon Pan

Application Fundamentals | Android Developers - 0 views

  • passes
  • When onReceive() returns
  • by the system at any time
  • ...13 more annotations...
  • to start a service
  • presents
  • memory paging state
  • Broadcast receiver lifecycle
  • The activity at the top of the stack is one that's currently running
  • The root activity in the stack is the one that began the task
  • Suppose
  • keeping both activities in the same task.
  • Tasks
  • A task is a stack of activities, not a class or an element in the manifest file.
  • The current task goes into the background and the root activity for the new task is displayed.
  • Rather
  • the previous activity in the same task is displayed.
Vincent Tsao

Applying Styles and Themes | Android Developers - 0 views

  •  
    using style/theme to make our layout views neat and maintainable
Vincent Tsao

Supporting Multiple Screens | Android Developers - 0 views

  • The density of a screen is important because, other things being equal, a UI element (such as a button) whose height and width are defined in terms of screen pixels will appear larger on the lower density screen and smaller on the higher density screen.
  • The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, the baseline density assumed by the platform (as described later in this document). At run time, the platform transparently handles any scaling of the dip units needed, based on the actual density of the screen in use. The conversion of dip units to screen pixels is simple: pixels = dips * (density / 160). For example, on 240 dpi screen, 1 dip would equal 1.5 physical pixels. Using dip units to define your application's UI is highly recommended, as a way of ensuring proper display of your UI on different screens.
Vincent Tsao

Binding to Data with AdapterView | Android Developers - 0 views

  • Spinner s2 = (Spinner) findViewById(R.id.spinner2);Cursor cur = managedQuery(People.CONTENT_URI, PROJECTION, null, null);     SimpleCursorAdapter adapter2 = new SimpleCursorAdapter(this,    android.R.layout.simple_spinner_item, // Use a template                                          // that displays a                                          // text view    cur, // Give the cursor to the list adatper    new String[] {People.NAME}, // Map the NAME column in the                                         // people database to...    new int[] {android.R.id.text1}); // The "text1" view defined in                                     // the XML template                                         adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);s2.setAdapter(adapter2);
Vincent Tsao

johannilsson/android-actionbar - GitHub - 0 views

  • This projects aims to provide a reusable action bar widget. The action bar replaces the default title and is therefor located at the top of the screen. The action bar highlights important actions. The action bar pattern is well documented over at Android Patterns. The action bar widget is an Library Project. This means that there's no need to copy-paste resources into your own project, simply add the action bar widget as a reference to your existing project.
Vincent Tsao

Android Interaction Patterns | - 3 views

  • This is androidpatterns.com, a set of interaction patterns that can help you design Android apps. An interaction pattern is a short hand summary of a design solution that has proven to work more than once. Please be inspired: use them as a guide, not as a law.
    • Simon Pan
       
      请问这个网站在介绍介面而已吗?
    • Vincent Tsao
       
      应该是,只介绍UI, UE而已
1 - 20 of 26 Next ›
Showing 20 items per page