android-actionbar

Android ActionbarSherlock show menu button at top

孤街浪徒 提交于 2019-12-11 03:53:52
问题 I am trying to implement ActionBarSherlock in my application and I need to show the menu at the top of my application, integrated in action bar. The problem is that it's not working properly. I am using it like this : public boolean onCreateOptionsMenu(Menu menu) { menu.add("Refresh") .setIcon(R.drawable.ic_action_refresh) .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); menu.add("Settings") .setIcon(R.drawable.ic_action_settings) .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); return true

ActionBar three-dot dropdown opens at the wrong place

蹲街弑〆低调 提交于 2019-12-11 03:49:07
问题 I've implemented an ActionBar with the com.android.support:appcompat-v7:22.1.1 library. Here you can see the code and my question: ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme) That works, but I have one last problem. After changing the ActionBar to the new library, the settings dropdown opens into the actionbar and not among it (see image) and the background of the settings dropdown is grey instead of white? How can I solve that

Editing text in action bar

假如想象 提交于 2019-12-11 03:47:44
问题 I am using Action Bar Sherlock to create the UI for my app. Upon adding the dependencies to my project and such forth I created an activity to test it out. public class PPS extends SherlockActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getSupportMenuInflater(); inflater.inflate(R.menu.activity_main, menu);

Want to add Tabs with ActionSherlockBar

。_饼干妹妹 提交于 2019-12-11 03:41:52
问题 I want to add Tabs with ActionSherlockBar So i used this code from some (resource) and used the same code like i am giving. but after all the codes i am still not getting what i want. Even it is not showing any type of error Help me out Thank you for your suggestions TabListener : public class TabListener<T extends Fragment> implements ActionBar.TabListener{ private TabFragment mFragment; private final Activity mActivity; private final String mTag; private final Class<T> mClass; public

Android Vertical Menu

人走茶凉 提交于 2019-12-11 03:34:21
问题 I would like to create a menu to appear on the screen when the Menu button is pressed.I've implemented it and it appears in the bottom of the page but not the one i would like... Hereunder my code and my goal picture to achieve public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId(

Android custom action bar with action buttons

血红的双手。 提交于 2019-12-11 03:16:45
问题 Here is the action bar that I want to create. Here is items that I put in menu. <item android:id="@+id/search" android:title="Search" android:showAsAction="ifRoom|collapseActionView" android:actionLayout="@layout/search_layout" /> <item android:id="@+id/search1" android:title="PHOTO" android:showAsAction="ifRoom" android:actionLayout="@layout/search_layout" /> collapseActionView - collapses search menu on startup. After click on search item it shows edit text like on picture 1. But I need

Setting Action Bar Item Text Color?

本秂侑毒 提交于 2019-12-11 03:12:04
问题 I'm trying to set my Action bar Items' text colors by using a custom style , but it has no effect. I've tried setting: <item name="android:actionMenuTextColor">@style/AppTheme.ActionBar.Text</item> in both <style name="ActionBar" where it has no effect, and <style name="AppTheme" . If I do the latter, my app crashes with: 07-21 13:12:58.519: E/AndroidRuntime(24690): FATAL EXCEPTION: main 07-21 13:12:58.519: E/AndroidRuntime(24690): android.view.InflateException: Binary XML file line #17:

ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme)

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:05:25
问题 I want to implement an ActionBar with the Android v7 appcompat library to support the ActionBar for Android >= 2.1 My app starts with the MainActivity which contains a dark Actionbar, some information and a start button. The next activity is the MenuActivity which contains also the dark Actionbar and some ActionBar Tabs which you can swipe This is my manifest.xml with the DarkActionBar theme: <application android:icon="@mipmap/ic_launcher" android:label="Hello World" android:theme="@android

Using DrawerLayout with Fragments and getting up navigation working

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 02:51:20
问题 I am using a DrawerLayout as the way to navigate the various screens of my app. I have a few different items in the drawer such as: News Photos Events Menu Each one of those is a Fragment (mostly ListFragment ), and then you can navigate deeper by tapping a row in the list to take you to another Fragment . E.g., seeing a list of photo galleries, then tapping one of them and it will show the photos. I am able to tap the drawer icon or slide from the left to show the drawer and choose any of

Is it possible to use sliding tabs and a spinner in the action bar in Android

为君一笑 提交于 2019-12-11 02:45:01
问题 I currently have an Activity with sliding tabs on it and I have been using ActionBarSherlock, but I wanted to have a spinner in the action bar, so that the user could select items from the spinner and each item is a specific file which opens up values to re-populate the views on each tab. I have looked to see how you can do this and so far have not had any luck. I don't want them to both navigate through fragments, but instead have the spinner to re-populate views on the tabs. I looked at a