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

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...
  • protected void onCreate(Bundle savedInstanceState) {    super.onCreate(savedInstanceState);    // Create an ArrayAdapter that will contain all list items    ArrayAdapter<String> adapter;    mTestArray =  = getResources().getStringArray(R.array.testArray);        /* Assign the name array to that adapter and     also choose a simple layout for the list items */     adapter = new ArrayAdapter<String>(    this,    android.R.layout.simple_list_item_1,    mTestArray);    // Assign the adapter to this ListActivity    setListAdapter(adapter);    }}
Vincent Tsao

Android YouTube app Play Video Intent - Stack Overflow - 1 views

  • Intent videoClient = new Intent(Intent.ACTION_VIEW);    videoClient.setData(Uri.parse("http://m.youtube.com/watch?v="+videoId));    videoClient.setClassName("com.google.android.youtube", "com.google.android.youtube.PlayerActivity");    startActivityForResult(videoClient, VIDEO_APP);
Vincent Tsao

Android之惑:平台复杂性与版本之祸_Google Android_cnBeta.COM - 1 views

  • Android的发展完全是爆发性的,就是在这一年内,Android从1.5版本瞬间升级到 2.3(1.5-1.6-2.0.1-2.1-2.2-2.2.1-2.3),由于苹果的升级基本上属于强制性的,也就是说基本上是同一时间端升级,除了 iphone 2G已经不再升级之外,大部分的iphone都会升级到最新的版本,对于开发者来说,只需要通过最新的SDK开发程序或者升级程序就可以了,而 Android开发者就会非常郁闷,原因是由于谷歌仅仅控制软件最基本的代码,准确的说就是Android非硬件部分的规范,而对于硬件方面,由于各个厂商的不同,所以就需要各个厂商自行调整,因此会存在当系统都是升级到2.3的时候,部分机型依旧是1.6版,对于正常的产品周期来看,必定会让购买了 1.6系统机型的用户相当不满
  • 而Android的发展完全是爆发性的,就是在这一年内,Android从1.5版本瞬间升级到 2.3(1.5-1.6-2.0.1-2.1-2.2-2.2.1-2.3),由于苹果的升级基本上属于强制性的,也就是说基本上是同一时间端升级,除了 iphone 2G已经不再升级之外,大部分的iphone都会升级到最新的版本,对于开发者来说,只需要通过最新的SDK开发程序或者升级程序就可以了,而 Android开发者就会非常郁闷,原因是由于谷歌仅仅控制软件最基本的代码,准确的说就是Android非硬件部分的规范,而对于硬件方面,由于各个厂商的不同,所以就需要各个厂商自行调整,因此会存在当系统都是升级到2.3的时候,部分机型依旧是1.6版,对于正常的产品周期来看,必定会让购买了 1.6系统机型的用户相当不满。 这并不是Android自身开发的怠慢,一年多个6个版本明显是超越iOS,但是由于硬件上自身调试的原因,并不是所有的玩家都能及时享受到最新版本,严重的滞后阻碍了Android系列手机的应用开发和用户体验
  • 从目前市场行业角度上分析,我觉得后期Android的发布将会和现在的很多开源软件一样,会采用双线并行的方式,即一个开发版本和一个稳定维护版本,首先谷歌会宣布几款设备将不会升级至2.X系,逐步将其淘汰,然后将2.X版本作为稳定开发版本,SDK也主要是为这个版本开发放出,并且保证大部分机型在这个版本系列上得到充分支持,而开发版本则是高端的3.X系列,为不稳定版本,官方不会放出相关的SDK给开发者,用于平台预览,但是会对几款高端机型提供相应的固件下载,保证了高端的GEEK玩家的需求,在2.X进入稳定期以后将会采用小版本号更新,如2.X.X这样,五年以后停止版本的官方支持,并且转移至更高的版本,(这一点上有点类似于mysql)我觉得这样会是一个比较稳妥的解决版本的方法。
  • ...1 more annotation...
  • 从目前的应用端来看,由于ARM架构存在着各个硬件公司设计上的差异和显示芯片的差异,对于Android平台还需要一个最低硬件的标准,如果Android平台能够确定软件的最低硬件,那么对于软件开发者来说将会非常方便,从目前中端机型升级Android 2.2就可以看出来,由于架构的差异,虽然中端机型可以升级至2.2版本,但是谷歌有意识的将其flash 10.1功能关闭,在一定程度上区分了高端机型与低端机型的功能,这也算是谷歌逐步统一系统平台的一个策略,将低端机型版本升级,但是缩减功能,不得不说谷歌和苹果一样,在这一点上是非常聪明的
Vincent Tsao

Kik:快速增长,更多功能 | 爱范儿: 拇指资讯小众讨论 - 1 views

  • 如果你看过主站介绍 Kik 的文章,一定对 Kik 用户的快速增长感到惊讶,这个功能简单的消息软件在短时间野蛮生长,在发行的 15 天内,用户人数从 0 增长到 100 万人
  • Kik 这种 Push IM 将快速消灭传统的短信,尤其是它把触角伸进你的通讯录之后
  • Kik 最初的目的是一个革命性的(很酷的)音乐分享、远程操作服务,但是 Kik 团队很快发现他们利用这些技术创造了一个信息交流应用,于是他们暂时放弃了音乐服务的打算,将所有多余的东西抛弃,专心做了一个快速、可靠的短消息应用。 Kik 的 CEO Ted Livingston 告诉 BGR,由于人数增长过快,他们不得不雇佣一架飞机,给数据中心增加服务器以保证服务的正常运行
  • ...1 more annotation...
  • 通讯录的那个设置是在开倒车。 Kik的魅力就是只要知道你的名字就可以发送短消息;如果非要加入好友才能发短消息,魅力荡然无存
Vincent Tsao

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).
    • Vincent Tsao
       
      用loadDataWithBaseURL接口才能访问asset中的资源文件,且baseurl不能为null
Vincent Tsao

Tech Droid: Android WebView, Javascript and CSS - 5 views

  • Calling a Javascript method from your Java code: webView.loadUrl("javascript:jsToggle()"); Calling a Java method from Javascript: window.jsinterface.nativeToggle(); /*   // Before using the above code, you have to inject the interface object which   // has a name "jsinterface"   webView.addJavascriptInterface(jsInterface, "jsinterface"); */
    • Vincent Tsao
       
      useful tips
    • Vincent Tsao
       
      JSInterface lets you bind Java objects into the WebView so they can be controlled from the web pages JavaScript, which means we can do anything to the content from webview via javascript interface, like what we can do with the html DOM content with javascrpit
    • Vincent Tsao
       
      i think so, you can fill form field with jsinterface
Vincent Tsao

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
Vincent Tsao

Vladimir Kroz blog - 0 views

  •  
    Author of "android-active-record": http://code.google.com/p/android-active-record/
Vincent Tsao

android-active-record - Project Hosting on Google Code - 0 views

  •  
    Shared by Miracle from China Android Dev
Vincent Tsao

既然我们有了china-android-dev,为什么还要创建这个Group? - 29 views

tips
  • Vincent Tsao
     
    欢迎新成员,享受一起分享的快乐~
  • Vincent Tsao
     
    欢迎来自China Android Dev中的新成员,为了更好的使用Diigo Group和Diigo,建议安装 Diigo为大家提供的toolbar(FireFox, Chrome, IE等各个browser都有相应工具支持),方便收集网页资料,并摘取这些网页资料中的精华部分

    ref: http://www.diigo.com/tools/toolbar
Vincent Tsao

Set Screen Orientation Manully - 0 views

android orientation tip
started by Vincent Tsao on 04 Nov 10 no follow-up yet
  • Vincent Tsao
     
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
Vincent Tsao

Applying Styles and Themes | Android Developers - 0 views

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

Possible to change between "full screen" and "with status bar"? - Android Developers | ... - 0 views

  • // go full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; mActivity.getWindow().setAttributes(attrs); // go non-full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); mActivity.getWindow().setAttributes(attrs);
    • Vincent Tsao
       
      these code can be simplified as below: //go full screen getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); //go non-full screen getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
  •  
    How to toggle fullscreen / non-fullscreen
Vincent Tsao

Android Gesture Detector - 醋溜的 - JavaEye技术网站 - 0 views

  •  
    good explanation for the actions: fling, scroll, ....
« First ‹ Previous 121 - 140 of 450 Next › Last »
Showing 20 items per page