android-actionbar

can't see search in action bar

梦想的初衷 提交于 2019-12-11 19:09:04
问题 Somehow I am unable to see search in action bar. menu main: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.actionbar.MainActivity" > <item android:id="@+id/action_settings" android:title="@string/action_settings" android:orderInCategory="100" app:showAsAction="never" /> <item android:id="@+id/action_search" android:title="Search" android:icon="

Android ActionBar missing after extending Appcompatactivity

筅森魡賤 提交于 2019-12-11 19:04:49
问题 I've recently updated my app extending Appcompatactivity in my Activities . Since then, the Actionbar is gone when I launch an external library Intent. For example, I'm using the HockeyApp SDK to launch their FeedbackActivity Here is my code: FeedbackManager.showFeedbackActivity(this, Uri.fromFile(file)); And here a screenshot (you can see the ActionBar is gone). It used to work before until I started extending Appcompatactivity. For the rest of Activities it works. The ActionBar is gone only

Align ImageView to fully left

寵の児 提交于 2019-12-11 18:51:41
问题 I have been fighting with this issue but I have no idea what I am doing wrong in here. I have a custom toolbar [code] <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="0dp" android:background="

Android Studio - ActionBar not displayed in the preview

孤街醉人 提交于 2019-12-11 18:38:46
问题 The ActionBar is visible when running the app on the device, however it is not in the preview section. In the preview: https://i.stack.imgur.com/dNjAz.png On the device: https://i.stack.imgur.com/IjIHn.png This is the styles.xml <!-- Base application theme. --> <style name="Theme.AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item

Status bar color of main activity changes but other activities status bar color remains same

旧巷老猫 提交于 2019-12-11 18:15:48
问题 How do i change my status bar color to black for all activities as this code only changes status bar color of main activity to black and color of status bar in other activities remain grey. <style name="CustomToolbarStyle" parent="Theme.AppCompat.Light.NoActionBar"> <item name="overlapAnchor">false</item> <item name="android:dropDownVerticalOffset">-4dp</item> <item name="colorPrimaryDark">@color/black</item> <item name="colorAccent">#000000</item> <item name="android:textColorSecondary">

Android. ActionBar. How to change ActionBar title color?

你离开我真会死。 提交于 2019-12-11 17:28:47
问题 I am trying to change ActionBar title color. I tried different ways to do it. But I could not solve this problem. I have created my own actionbar theme in values/styles.xml and values-14/styles.xml values/styles.xml <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light"> <item name="actionBarStyle">@style/MyActionBar</item> </style> <style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse"> <item name="background">@color/grey_actionbar

How can I hide the actionbar in a single fragment?

梦想与她 提交于 2019-12-11 17:26:32
问题 I am using AppCompat for my theme in my app. Also, I am using a viewpager to manage some fragments. Now I would to hide the actionbar in one of my fragments. How can I do that. I tried to hide the actionbar manually in the fragment like this import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActionBarActivity activity = (ActionBarActivity) this.getActivity();

Split Action Bar - Creating menu after clicking an item

。_饼干妹妹 提交于 2019-12-11 16:22:09
问题 I want to create something like this : So far what I've done : public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_layer: //I want to create my menu here break; case R.id.menu_direction: break; default: break; } return (true); }` It's my main menu.xml : <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_layer" android:icon="@drawable/ic_action_search" android:title="@string/menu_layers" android

How to have different icon button in action bar swipe tab?

亡梦爱人 提交于 2019-12-11 14:53:52
问题 I have 4 swipe tab in my app. I have successfully to create a home icon on action bar . Now I wanted to have a pen icon beside the home icon when comes to work details tab. How can I achieve this ? Thanks. Swipe Tab TabsFragmentAdapter public class TabsFragmentPagerAdapter extends FragmentPagerAdapter { public TabsFragmentPagerAdapter(FragmentManager fm) { super(fm); // TODO Auto-generated constructor stub } @Override public Fragment getItem(int index) { // TODO Auto-generated method stub if

Set elevation still display shadow below ActionBar in Android

走远了吗. 提交于 2019-12-11 14:03:29
问题 Inside values/styles.xml I have set <item name="elevation">0dp</item> to my AppTheme style. and inside values-21/styles.xml I have set <item name="android:elevation">0dp</item> and I Have also try this <item name="android:windowContentOverlay">@null</item> .I have also try to Clean the Project and Rebuild the Project. and also try to Invalidate Caches and Restart . But my Emulator still display shadow see the below screen. Question : How to remove that shadow below to ActionBar . ScreenShot :