Skip to main content

Home/ Android Dev/ Contents contributed and discussions participated by Vincent Tsao

Contents contributed and discussions participated by Vincent Tsao

Vincent Tsao

ListView/ListActivity limit items until last item reached, like in Android Market - And... - 0 views

  • These applications use an OnScrollListener to detect when the last item is displayed. When this happens, they load more items and add them to the list adapter.
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

Adding items to a ListView - Android Developers | Google Groups - 0 views

  • SizzlingSkizzorsProgrammer wrote: > After the listview is already initialized, is it possible to add items > to it during runtime? Just add the new items to the adapter, or the data source that backs up the adapter (if it's a CursorAdapter).
Vincent Tsao

BlindType, 输入法的下一站天后? | 谷安--谷奥Android专题站 - 0 views

  • 根据 BlindType 团队的说法,BlindType 输入法可以根据你输入时触摸屏幕键盘的位置来判断你所输入的字母,而无需你去边看边打了。目前 BlindType 正在为这一输入方式在 Android 机型上实现而努力
Vincent Tsao

NubiNews Blog: Help us diagnose problems - 0 views

  • If you see a weird problem with NubiNews, you can help us diagnose the problem by sending us the "Log File".Install an application called SendLog from the Android Market.Start NubiNews. Proceed until your problem occurs.Go back to the Home Screem and launch SendLog.Tap on the "Send" buttonChoose e-mail address nubinews@gmail.comThanks!中文:可以在Android Market安装一个叫SendLog的程序,然后跑大牛新闻,问题出现之后启动SendLog,点“Send”,发送到我们的邮箱
Vincent Tsao

译言网 | 如何发挥 Android 锁定屏幕的潜力 - 0 views

  • Android 的某些功能着实让人喜爱,而另一些尚需改进。我们觉得 Google 应该改进的一个地方就是 Android 的待机锁定屏幕的可用性。Android 的优秀的小工具框架能让它在一瞥之间提供不少信息。现在的这个空旷的锁定屏幕一定可以得到增强(这对于平板电脑来说非常合适),而多亏了一些应用程序,Android 可以做到这一点
Vincent Tsao

MinimumPC: App Inventor with an Emulated Android - 0 views

  •  
    可以将Inventor中的原型导入emulator中进行测试了!
Vincent Tsao

《程序员》精彩推荐:Android程序创意过滤与失败经验谈 - 0 views

  • 思路转换的失败
  • 针对的用户群体动辄就是全球目标用户,在商业判断和分析上,最基础的一个考量就是用户群体和业务模式的总量的收益是否足够大,对用户群体的研究和商业判断分析完全根据市场分析报告和数据来做判断。因此,不可避免地在程序创意思路上会沿用以前的工作思路和分析方法。 在考虑Android上的创意的同时,不自觉地就考虑和分析了如下几个方面的问题: 1. 是否为用户所必需? 2. 技术上是否领先? 3. 程序的粘性是否足够? 4. 用户群体是否足够大? 因此,沿用这个思路,不可避免地就会往大的应用和大的服务上去思考和做出判断。
  • 经过反复地反省和对比,初步得出了这样的失败教训: 1. 对于个人开发者和小型团队来说,不适合做过于基础的程序。操作的模式和理念上的创新与用户的接受度有相当的距离。这样的事情只有大公司才有财力和可能进行推广。比如说手机生产商,他们可以通过预置的方式进行推广。而对个人开发者来说,得先证明你的想法是成功的,不能假设一个会成功的需求和应用,然后卖给设备厂商。 2. 个人开发者和小型团队不适合做大的程序,尤其是开发时间不要超过2个月。4个人,3个月的时间,对于一个小团队来说 ,是相当宝贵的。这不仅仅是时间和金钱的问题,更多的是信心问题。 3. 用户能否真正接受你的想法,是一个关键性的问题。设想和推导都很完美,唯独缺了用户是否真正喜欢和接受这一条,又没有方法进行快速地验证和试错,基本上不能成功。
  • ...6 more annotations...
  • 因此,在开发者头脑风暴产生一个创意之后,要做的几个最主要的过滤在于: 1. 开发时间是否太长? 2. 开发的技术难度是否会过高,而导致不能实现或者质量不可靠? 3. 有怎样的办法来判断用户是否会喜欢? 有了这几个过滤条件,相信能够减少失败的几率,或者说能够Fail Fast(尽快失败),从而减少损失。
  • 技术门槛的失败
  • 这也让我们多了一个失败的教训: 1. 技术门槛不高,不能保证你一直保持优势。对你来说简单的程序,对竞争对手来说,程序同样的简单。因此,你能做,别人也能做。在这一点上,其实竞争同样激烈。 2. 封账号的代价相当之大,基本上等于你的努力悉数尽毁。Don’t do evil。 因此,在这个案例中,增加了一个新的创意过滤条件: 程序的创意是否过于简单?如果过于简单,那么创意能够始终保持成功的机会不会太高
  • 依赖第三方资源的失败
  • 这个时候,FML的官网发现了这个机会。他们觉得这是一个很好的想法,应该自己在Market上发布自己的官方程序。于是,他们干了这样的事情来清除竞争对手。他们直接向Google举报,说其它程序没有得到他们的授权。一次举报,竞争对手全部清干净了,于是他们的官方程序上线了。 这一次,得到了一个更加深刻的教训: 1. 不要过于依赖第三方资源。依赖第三方资源或者网站的名气,的确可能帮助你的程序受到很多关注,代价也同样存在,一旦人家开始动手举报,你连还手的机会都没有。 2. 不要选错第三方资源。很多的服务提供商是不开放的,尽管他们没有明确说明。同时还有很多服务提供商是充分开放的,比如Twitter就是一个非常开放的例子。选错了第三方资源,结果一样会失败。 因此,这里又多了一个创意过滤的条件: 是否依赖于第三方资源? 如果是,请尽快绕道离开,因为很难靠这个想法走太远。
  • 1. Don’t do evil。美国人做事的方式非常直接,同时会默认你是善意的。对于Google来说,尤其如此。因此,在我尝试过的程序中,你可以任意发布你的程序到Google Market。但是,如果涉及到版权纠纷,不管是网站的所有者、原程序的开发者还是其它任何一种类型的版权纠纷,一旦举报到Google,轻者下架单个程序,重者封禁整个账号,并且下架所有程序。也就是说,一旦受到处罚,你就别想翻身了。因此,Don’t do evil。 2. Google的审查底线。尽管Google不做审查,但除了和版权争议相关的程序之外,哪怕是你自己的程序,依然有如下的禁区是不能碰的: a. 不要使用任何Google相关的名义。程序名、开发者名都不能涉及到Google或者看起来类似Google的名称,否则Google不会予以通过。 b. 不要违反任何Google的开发者协议。需要仔细阅读Google的开发者协议,在不同时候Google的开发者协议会经常更新。因此,只要违反了任何Google开发者协议,当Google处罚到你的时候,基本上没有申辩机会。因此,务必要小心。
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
Vincent Tsao

View not attached to window manager-中国网盟有问必答 - 2 views

  • 把pdialog.dismiss()改成pdialog.hide()了,我亲自试验过了的。不过Logcat里面还是有错误信息,不过不会出现FC错误
  • 在用ProgressDialog的时候,用线程关闭的时候会出现这个错误,困扰很旧了。 详细错误信息:java.lang.IllegalArgumentException: View not attached to window manager
Vincent Tsao

Android 2.1′s speech-to-text feature reviewed - it's "OK", just about » EuroD... - 0 views

  • Their conclusion is that Android 2.1′s new speech-to-text thing works, just about, although there’s a delay of a few seconds while the phone crunches your spoken words and tries to get the gist of what you’re saying – and a few errors sneak in, particularly when dealing with those smaller words we tend to hurry over. Basically, it looks like you have an awkward choice to make – speak your messages then spend a bit of time awkwardly tidying up the few errors that will inevitably sneak in, or carry on as normal with traditional text input methods.
Vincent Tsao

Getting the Manifest Version Code - Android Developers | Google Groups - 0 views

  • PackageInfo pInfo = null; try {         pInfo = getPackageManager().getPackageInfo("com.beanie.test", PackageManager.GET_META_DATA);         } catch (NameNotFoundException e) {                 e.printStackTrace(); } System.out.println(pInfo.versionCode);
« First ‹ Previous 181 - 200 of 450 Next › Last »
Showing 20 items per page