Skip to main content

Home/ Android Dev/ Group items tagged search

Rss Feed Group items tagged

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

How to disable a button on an appwidget? | Hello Android - 0 views

  • RemoteViews can't manipulate a buttons enabled/disabled state, but it can modify its visibility. So the trick is to have two buttons, the real one, and an other which is designed to look like the real one in disabled state, and change witch one is visible.
  • <Button android:id="@+id/startbutton" android:text="Start" android:visibility="visible"></Button> <Button android:id="@+id/startbutton_disabled" android:text="Start" android:clickable="false" android:textColor="#999999" android:visibility="gone"></Button>   <Button android:id="@+id/stopbutton" android:text="Stop"  android:visibility="gone"></Button> <Button android:id="@+id/stopbutton_disabled" android:text="Stop" android:clickable="false" android:textColor="#999999" android:visibility="visible"></Button>
  • RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widget); remoteView.setViewVisibility(R.id.startbutton, View.GONE); remoteView.setViewVisibility(R.id.startbutton_disabled, View.VISIBLE); remoteView.setViewVisibility(R.id.stopbutton, View.VISIBLE); remoteView.setViewVisibility(R.id.stopbutton_disabled, View.GONE); AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteView);
  • ...1 more annotation...
  • RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widget); remoteView.setViewVisibility(R.id.startbutton, View.VISIBLE); remoteView.setViewVisibility(R.id.startbutton_disabled, View.GONE); remoteView.setViewVisibility(R.id.stopbutton, View.GONE); remoteView.setViewVisibility(R.id.stopbutton_disabled, View.VISIBLE); AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteView);
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

Android Developers Blog: Twitter for Android: A closer look at Android's evolving UI pa... - 1 views

  • Additionally, you can feel free to use the Search bar selection mechanism as a replacement for tabs since it’s really just a fast pivot on a data set. If you have more than 3 data sets, tabs become problematic since no more than 3 can be onscreen at once. For example, look at how we implemented the Profile switching mechanism below:
  • The good news for developers is you get this highly functional contacts feature for free if users choose to sync contact information into your app
    • Vincent Tsao
       
      使用tab & pop-up window的方式来切换不同的数据集,作为tab的一种替换
  • The good news for developers is you get this highly functional contacts feature for free if users choose to sync contact information into your app. QuickContact for Android provides instant access to a contact's information and communication modes.
  • ...3 more annotations...
  • QuickActions can be used as a replacement for our traditional dialog invoked by long press.
  • The dashboard pattern serves as a home orientation activity for your users. It is meant to include the categories or features of your application. We recommend including an Action bar on this screen as well. The dashboard can be static or dynamic. For example, in the case of our dashboard for Twitter, we used the goodness of Live Wallpapers introduced in 2.1 to create an animated dashboard complete with real-time trend bubbles and the Twitter bird silhouette.
  • You keep a search history so users upon returning to the search activity can have quick one-button access to previous searches.
Vincent Tsao

Action bar | Android Interaction Patterns | - 1 views

  • The action bar: is located at the top of the screen to support navigation and highlight important functionalities replaces the title bar (which is often included into it) is best used for actions across your app, like search, refresh and compose can provide a quick link to app homeby tapping the app logo is preferably not contextual, but actions can differ from page to page
  • Use when You want to bring key actions on screen, so they are in sight. You don't want to hide them under the menu-button. The action bar is best used for common actions like search, refresh and compose. When screen real estate is valuable, consider putting actions in the options menu.
Vincent Tsao

How QR Codes Can Grow Your Business | Social Media Examiner - 1 views

  • Consumers want immediate access to what’s relevant and QR codes are being used to make that possible.
  • Bar codes are linear one-dimensional codes and can only hold up to 20 numerical digits, whereas QR codes are two-dimensional (2D) matrix barcodes that can hold thousands of alphanumeric characters of information. Their ability to hold more information and their ease of use makes them practical for small businesses.
  • When you scan or read a QR code with your iPhone, Android or other camera-enabled Smartphone, you can link to digital content on the web; activate a number of phone functions including email, IM and SMS; and connect the mobile device to a web browser.
  • ...4 more annotations...
  • There are other software companies that have created 2D codes that work much like QR codes, with Microsoft being the most notable.  Microsoft developed their own proprietary software to create codes known as MS tags.  Unlike QR codes, which can be read by a number of different readers, MS tags can only be read by the Microsoft Tag Reader.
  • Calls to Action – After building a community, the next logical step is to mobilize them to take action.   What are you trying to accomplish?  You can alternate special offers by simply linking your QR codes to new landing pages, and you can combine then with email opt-ins to build your list.
  • SEO and SMO – Earlier this month I wrote an article on social graphs where I discuss how web objects such as images, music clips, and videos add valuable content to your social graph.  QR codes enhance both your search engine and social media optimization.  Now you can increase traffic to those searchable objects to further optimize them by encouraging more sharing.
  • Social Proof – To help build a community offline, it can be helpful to use your vibrant online communities as social proof of your influence and expertise.  As one example, you can use QR codes to link to specific blog posts that have earned an abundance of activity.
1 - 9 of 9
Showing 20 items per page