2

Action Bar Sherlock は、きちんとしたライブラリである一方で、ご存知かもしれませんが、2 つか 3 つの非常に侵略的な要素があります。

  1. Fragments と Activity を SherlockFragments と SherlockActivities から継承する必要があります。これはまばらなリソースであり、同じことを行う必要がある別の便利なライブラリには使用できません。幸いなことに、compat ライブラリはその 1 つではありません (実際にはそうですが、Sherlock はその上に構築されています)。

  2. Android ライブラリ プロジェクトを使用します。これらのツールはまだ非常に安定しているとは言えないため、すぐに問題が発生する可能性があります。実際、私は Eclipse のバグに遭遇しました。

  3. これは、Proguard の仕事を難しくし、apk のサイズを大きくするもう 1 つのライブラリです。Apk のサイズは、Google TV ユーザーを含む一部のユーザーにとって依然として大きな制限です。

そのため、Action Bar Sherlock を使用することを選択した場合、サードパーティのものを含め、他にどのような (将来の) ライブラリを除外できますか? 私が見逃している他の制限はありますか?

4

2 に答える 2

1

そのため、Action Bar Sherlock を使用することを選択した場合、サードパーティのものを含め、他にどのような (将来の) ライブラリを除外できますか? 私が見逃している他の制限はありますか?

率直に言って、私は何も知りません。のカスタム実装を使用しているほとんどのライブラリActivity(ActionBarSherlock も同様に行っているように) は拡張される可能性が高くSherlockActivity(ほとんどの人が ABS を使用しているため)、そうでない場合は自分で変更することができます。いいえ、私が知る限り、制限はありません。

于 2012-12-24T01:14:33.763 に答える
1
  1. As @Jake Wharton himself pointed out this is just not true. Using the existing code and examples, it is a simple and fairly quick implementation for creating custom ABS activities and fragments.

  2. I use library projects extensively, including having library project references that go multiple levels deep. I've run into a few issues, but nothing that was a deal breaker. Eclipse gets confused sometimes on rebuilds, but usually cleaning all the projects gets everything sorted out. Library projects are getting more stable all the time.

  3. This is actually two points, but with a similar theme -- for any library, not just ABS, you have to tradeoff the value you get from including the library's features against the cost of doing so. I feel the value of the interface right now is worth the extra effort and apk size. This is a value decision that needs to be made on a per app basis.

@Ahmad is correct, ABS poses obvious no limitations on 3rd party libraries. It might take some coding to integrate, but they should work together. Furthermore, ABS use will fade naturally in the future. It is a compatibility library, so as the device distribution shifts more and more to Android 3+ devices, the need to support action bar UIs on 2.X devices will be less of an issue.

于 2012-12-24T02:50:38.943 に答える