1

Googleカレンダーのアクションバーの側面を再作成しようとしています-具体的には、クリックするとタイトルが含まれていないドロップダウンメニューを提供するタイトル(画像の「2012年5月」)を表示したいです.

誰かがこれを行う方法を持っていますか - 理想的には、下位互換性を提供するために、ActionBarSherlock で動作するものを探しています。

ここに画像の説明を入力

4

1 に答える 1

4

Was trying to achieve the exact same result today and of course the best is to look at Google's very own Calendar Sources here (thanks Nicolas Klein).

The code you want to look at is used in AllInOneActivity, which uses a custom Adapter (CalendarViewAdapter extends BaseAdapater) and two different layouts (actionbar_pulldown_menu_button.xml and actionbar_pulldown_menu_top_button.xml)

They basically inflate the menu layout in the getDropDownView method of the adapter and the top menu layout in the getView method.

于 2012-08-01T17:49:27.020 に答える