Skip to main content

Home/ Android Dev/ Group items tagged fragments

Rss Feed Group items tagged

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.
  •  
    好特別、好酷的一個類
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之惑:平台复杂性与版本之祸_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

java - remove notification bar shadow in android app - Stack Overflow - 0 views

  • <!-- Variation on the Light theme that turns off the title --><style name="Theme.IOSched" parent="android:style/Theme.Light">    <item name="android:windowNoTitle">true</item>    <item name="android:windowContentOverlay">@null</item></style>
  • The android:windowContentOverlay is your shadow, and setting it to @null in your theme will eliminate it. You can see this in action in the Google I|O 2010 conference app, which uses many of the same UI conventions as does the new Twitter app. However, right now, the Twitter app has not yet been open-sourced, which is why I point you to the I|O app. The code fragment above is from that app's styles.xml resource.
1 - 5 of 5
Showing 20 items per page