Skip to main content

Home/ Android Dev/ Group items matching "android" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
Vincent Tsao

Avoiding Memory Leaks | Android Developers - 0 views

  • As part of my job, I ran into memory leaks issues in Android applications and they are most of the time due to the same mistake: keeping a long-lived reference to a Context.
  • There are two easy ways to avoid context-related memory leaks. The most obvious one is to avoid escaping the context outside of its own scope. The example above showed the case of a static reference but inner classes and their implicit reference to the outer class can be equally dangerous. The second solution is to use the Application context. This context will live as long as your application is alive and does not depend on the activities life cycle. If you plan on keeping long-lived objects that need a context, remember the application object. You can obtain it easily by calling Context.getApplicationContext() or Activity.getApplication().
  • In summary, to avoid context-related memory leaks, remember the following: Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself) Try using the context-application instead of a context-activity Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside. The solution to this issue is to use a static inner class with a WeakReference to the outer class, as done in ViewRoot and its W inner class for instance A garbage collector is not an insurance against memory leaks
Vincent Tsao

Android 用户界面问题的解决 | 谷安--谷奥Android专题站 - 3 views

  • 让我们惊奇的是自从 Matias Duarte 加入 Google 之后 Android 的用户界面已经发生了很多改变和改进。Matias 以前工作于 Sidekick、Helio 和 Palm 的 WebOS,所以 Android 与他是完美的组合。仅 9 个月,Matias Duarte 和他的团队就解决了很多 Android 用户界面的不足之处:虚拟键盘不够好,平庸的多任务界面,隐藏的菜单需要点击按钮才能显示,而且软键盘不够灵活固定在了单一的方向等。
  • Android Honeycomb 中用导航栏和命令动作取代了隐藏菜单
Kiran Kuppa

Android Fragmentation Visualized - OpenSignal - 1 views

  •  
    "Fragmentation matters to the entire Android community: users, developers, OEMs, brands & networks. It's a blessing and a curse. The Blessing. Fragmentation allows users to take their pick from thousands of devices. You can choose from phones with 3D screens, projectors, CDMA, GSM, or even CDMA & GSM. You may not care that Tag Heuer has made an Android phone but at least one person does (and they use OpenSignalMaps). It's a triumph for Android that as a single OS it can target so many markets. The Curse. The proliferation of devices with their associated screen sizes, internal hardware and custom ROMs creates some difficulties. We spend a lot of time making the app presentable (or at less functional) on exotic devices - this is the most common request we get from app users"
Vincent Tsao

Android 2.2 深度功能评测 | ifanr 爱范儿 ♂专注于拇指设备的小众讨论 - 1 views

  • Android 2.2 是一次增补式的更新,但仅靠效率提升一点就让它成为 Android 狂热者的重要升级。提升的响应速度和更平滑的界面过渡大大提升了用户体验。 几个新功能——特别是批量升级——提供了立即可用的明显好处。其它功能,如 SD 卡程序存储和云备份,可能要在 Android 开发者大量应用后才能体现真正的价值。我对云端信息服务特别有兴趣——这应该能够极大的丰富 Android,为程序开发社区开启创新之门。 Google 积极的开发努力将 Android 快速向前推进。和两年前相比,系统更成熟了。2.2 版本新增的 JIT 大大解决了 Android 的效率问题,赋予了它前所未有的竞争力。Google 正在向 3.0 迈进,用户界面似乎会有大革新,我们很有可能看到更多创新
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

Android Rises in Mobile Web Usage, iPhone Stagnates, Declines - 0 views

  • Worldwide, it doesn't look so bad for Apple yet; it's still the king of the hill by a long shot, steady at about 50%. Android is making inroads, though, now accounting for almost a quarter of the world's mobile web usage.
  • And now we get to the interesting part: the United States. The top-notch Android phones have been available in the US for longer than in other countries, and carriers there have been pushing them longer. This shows: in the US, Android has almost overtaken the iPhone OS (which excludes the iPod Touch!) in mobile web usage - 42% vs. 44%.
  • ...2 more annotations...
  • In November 2009, the iPhone OS accounted for 55% of the mobile web usage in the US; now it's down to 44%. In the same timespan, Android grew from 27% to 42%. The US can be seen as a test bed for the rest of the world, since Android hasn't been pushed as much outside of the US as it has been inside of the US. In Apple's defence, though, the arrival of the iPad in the coming weeks may reverse the declining trend of the iPhone OS. And, as noted, the iPod Touch is not included in these figures. All in all, it's clear that Android is no longer just a speck on the horizon. Google's mobile operating system is a serious threat to Apple's iPhone, which could further explain why Apple decided to sue HTC. Jobs might be drinking coffee with Schmidt in a nicely staged press moment, but in the meantime, the '80s and '90s are happening all over again for Apple: the PC business model beating the Mac one.
Vincent Tsao

官方的 Adobe Reader for Android 提供下载 | 谷安--谷奥Android专题站 - 1 views

  • Adobe Reader for Android支持多指手势,包括双指缩放、双击缩放、拖动等等,还包括一个新的reflow模式,会将宽度又宽文字又多的页面在小屏幕上也能方便阅读。不过Adobe Reader for Android不支持搜索,不支持那些被密码保护的文档。 在菜市场里搜索Adobe Reader for Android就可以找到。
Kiran Kuppa

Using Ant to Automate Building Android Applications - 0 views

  •  
    Using the Eclipse GUI does not allow one to easily: (a) Add custom build steps (b) Use an automated build system (c) Use build configurations (d) Build the release project with one command.Fortunately, the Android SDK comes equipped with support for Ant.This tutorial will show you how to incorporate an Ant build script into your Android projects,even if you still develop with Eclipse.
David Martin

Future of Android OS for Mobile Phones - 4 views

  •  
    The post focuses on some great points which I believe Google should accept in their next update of Android version.
Vincent Tsao

Android Market 应用数量将在本月突破十万大关 | 谷安--谷奥Android专题站 - 0 views

  • 上图是AndroLib.com统计的Android Market应用数量图表,可以看到截至7月1日应用数量已经超过9万大关,按照这个增速计算在7月里Android Market应用数量肯定会突破10万大关。要知道一年前这个数量还不到1万。
Vincent Tsao

HTC Magic will get Android 2.2, According to SFR | Android Community - 0 views

  • Most Android Smartphones released this year will receive the Android 2.2 Froyo. If you have a 2009 HTC Magic, then you might receive the Android 2.2 Froyo as well. France’s 2nd largest largest mobile carrier SFR officially announced the Magic will be receiving the Froyo update.
  • T-Mobile USA said the myTouch 3G, basically the same thing as a HTC Magic would be updated with Froyo a bit later this year. So it looks like the old Magic will be receiving the new Google OS in the next few months.
Vincent Tsao

Android Endless List - Stack Overflow - 0 views

  • 5 down vote accepted One solution is to implement an OnScrollListener and make changes (like adding items, etc.) to the ListAdapter at a convenient state in its onScrollStateChanged method. The following ListActivity shows a list of integers, starting with 40, adding 10 per scroll-stop.
  • public class Test extends ListActivity implements OnScrollListener {    Aleph0 adapter = new Aleph0();    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setListAdapter(adapter);         getListView().setOnScrollListener(this);    }    public void onScroll(AbsListView v, int i, int j, int k) { }    public void onScrollStateChanged(AbsListView v, int state) {        if(state == OnScrollListener.SCROLL_STATE_IDLE) {                adapter.count += 10;                adapter.notifyDataSetChanged();        }    }    class Aleph0 extends BaseAdapter {        int count = 40;        public int getCount() { return count; }        public Object getItem(int pos) { return pos; }        public long getItemId(int pos) { return pos; }        public View getView(int pos, View v, ViewGroup p) {                TextView view = new TextView(Test.this);                view.setText("entry " + pos);                return view;        }    }}
  • You should obviously use separate threads for long running actions (like loading web-data) and might want to indicate progress in the last list item (like the market or gmail apps do).
Vincent Tsao

请教,使用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
Vincent Tsao

Android程序在手机上的保留时间比iPhone程序更长 | iFanr 爱范儿 ♂专注于拇指设备的小众讨论 - 0 views

  • 最近,专门调查分析智能手机程序使用情况的Flurry.com公布了一幅有意思程序保留时间对比图。Android程序安装3个月后的保留比例和iPhone在30天后的比例相当
  • 可能的原因?Flurry的看法是: iPhone的软件选择更多 Android用户平均年龄更大,玩机热情不如以往 Android用户更宽容,更善于利用现有程序
    • Vincent Tsao
       
      我的解释是:1. 有价值的可供选择的android app确实不多 2. android app偏向于实用,Iphone app酷的比较多
Vincent Tsao

Android - Working With Android Contacts - Android Tutorials - 0 views

  •  
    shared by Yan Wang in China-android-dev group
Vincent Tsao

Android Cloud to Device Messaging Framework - Google Projects for Android - 1 views

  • It allows third-party application servers to send lightweight messages to their Android applications. The messaging service is not designed for sending a lot of user content via the messages. Rather, it should be used to tell the application that there is new data on the server, so that the application can fetch it. C2DM makes no guarantees about delivery or the order of messages. So, for example, while you might use this feature to tell an instant messaging application that the user has new messages, you probably would not use it to pass the actual messages. An application on an Android device doesn’t need to be running to receive messages. The system will wake up the application via Intent broadcast when the the message arrives, as long as the application is set up with the proper broadcast receiver and permissions.
  • It uses an existing connection for Google services. This requires users to set up their Google account on their mobile devices.
  • C2DM imposes the following limitations: The message size limit is 1024 bytes. Google limits the number of messages a sender sends in aggregate, and the number of messages a sender sends to a specific device
  • ...1 more annotation...
  • The ClientLogin token authorizes the application server to send messages to a particular Android application. An application server has one ClientLogin token for a particular 3rd party app, and multiple registration IDs. Each registration ID represents a particular device that has registered to use the messaging service for a particular 3rd party app.
Vincent Tsao

Android Developers Blog: Final Android 3.0 Platform and Updated SDK Tools - 1 views

  •  
    Android 3.0正式版终于发布了,同志们赶紧跟进了
Vincent Tsao

svg-android - SVG parsing and rendering for android - Google Project Hosting - 1 views

  • This is a compact and straightforward library for parsing SVG files and rendering them in an Android Canvas. By using vector art, the pain of supporting various screen sizes and densities in Android can be reduced. This was the library used to render the artwork and the interface of Androidify. The project also includes a Live Wallpaper app extracted from Androidify. The app shows off the SVG library, and demonstrates the rendering pipeline used to draw the Androids.
Kiran Kuppa

apps-for-android - Sample Applications for the android platform - Google Project Hosting - 2 views

  •  
    "A collection of useful, open source applications that demonstrate basic features of the Android platform."
‹ Previous 21 - 40 of 466 Next › Last »
Showing 20 items per page