android-appcompat

Adding Maven repository causes an error - android.support.v7.widget.AppcompatTextView can't be instantiated

旧时模样 提交于 2019-12-20 03:20:13
问题 Note: I have gone through all the related posts and did exactly what was written but nothing worked. I am trying to add ConstraintLayout 1.1.0-beta1 for percent dimensions, but whenever I do this, a pop-up comes at the bottom which is below. I clicked "Install Repositiory and Sync project" many times but nothing happened. So, I tried to add the following code in Build.gradle (Project) and it worked fine but a new error came. repositories { maven { url 'https://maven.google.com' } } The new

ActionBarCompat menu item is not showing [duplicate]

折月煮酒 提交于 2019-12-20 01:14:26
问题 This question already has answers here : Actionbar not shown with AppCompat (3 answers) Closed 5 years ago . Here is my general.xml file <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> <item android:id="@+id/next" android:title="Next" android:visible="true" android:enabled="true" android:showAsAction="always" android:orderInCategory="1

Android remove localizations

无人久伴 提交于 2019-12-19 19:56:29
问题 My app at Play Store does not have any localizations other than the default: English (United States) . This time I created a new apk to update it. And it uses android-support-v7-appcompat library. So when I uploaded the new apk and in the apk details it says 'added 72 new localizations'. These are coming from the values folders in android-support-v7-appcompat (values-af, values-am,...etc). Is this okay or if not, how do I remove the localizations? My app has just one values folder and I do

Cannot instantiate class android.support.v7.widget.SearchView

醉酒当歌 提交于 2019-12-19 05:04:36
问题 Please somebody help me! I trying add appcompat search view to my project. Unsuccessfully. When I change android.support.v7.widget.SearchView to SearchView (API > 10) everything's fine. This my menu res: <item android:id="@+id/action_search" android:title="@string/search_view_title" android:icon="@drawable/action_search" sabd:showAsAction="always|collapseActionView" sabd:actionViewClass="android.support.v7.widget.SearchView" /> This how I try to use SeachView: @Override public void

Edittext color is white in appcompat 22.2

丶灬走出姿态 提交于 2019-12-19 04:09:15
问题 EDIT 2 : This is happening because of the line <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> in styles.xml . I'm using this to display light color (white) texts and back home button in ToolBar . If i change this to <item name="theme">@style/ThemeOverlay.AppCompat.Light</item> then EditText is working as expected but my ToolBar text and back home button colors are changes to dark (black). As I'm using dark colored ToolBar I would like to show the text and back home

Toolbar is not visible on Android 4.X devices

青春壹個敷衍的年華 提交于 2019-12-19 03:14:14
问题 I just updated android.support:appcompat lib to 22.1.1. Toolbar is visible on a Lollipop device but not on a 4.X device. I have even tried extending AppCompatActivity, but still no luck. If anything else is required please let me know. Here is my project styles and base activity xml file. styles.xml <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primarydark</item> <item name=

Support Toolbar's custom view not using full width

北城以北 提交于 2019-12-19 02:08:31
问题 I'm using support v7's toolbar. I added a custom view, but the custom view doesn't seem to obey "match_parent". It would only stretch as far as the first icon it sees. Does anyone know a fix to this? Or is the toolbar not meant to be used this way? My code: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match

Raised and flat buttons with different background and highlight colors

*爱你&永不变心* 提交于 2019-12-18 18:03:23
问题 I'm creating application using com.android.support:appcompat-v7:23.0.1 library. I define application theme in values/styles.xml : <style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorAccent">@color/accent</item> <item name="colorControlHighlight">@color/highlight_dark</item> <item name="colorButtonNormal">@color/primary</item> <item name="android

Toolbar and TabLayout is not visible on Android 4.4 devices

我只是一个虾纸丫 提交于 2019-12-18 16:25:28
问题 I was trying to implement Toolbar and TabLayout using google design library by referring to [http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/] [blog]. Output works as expected on Lollipop devices but it doesnot show ToolBar and TabLayout on Kitkat devices. But i can still swipe through 3 fragment as expected on kitkat device as well. How come same code written using google support libraries works differently on different devices! I tried referring to

Setting a subtitle on my Toolbar from a fragment

偶尔善良 提交于 2019-12-18 13:15:21
问题 I am having some trouble setting the sub-title in my Toolbar from my fragment. I keep getting a Null Pointer Exception at the setSubTitle. @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getActivity().getActionBar().setSubtitle("About"); // NULL POINTER EXCEPTION here } Adding the toolbar to the host activity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R