android-appcompat

How to use Android's AppCompat theming application-wide?

人走茶凉 提交于 2019-12-11 02:19:20
问题 IDE : Android Studio 1.1.0 ENV : Debugging on usb-connected phone using Android API v10. I'm trying to use AppCompat to support Android API v8 and up. Compiles fine but crashes when the activity is drawn, saying: lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. ...however, in AndroidManifest.xml I have: <application android:name=".objects.PikCMS" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app

Android Toolbar Action button height

青春壹個敷衍的年華 提交于 2019-12-11 01:59:33
问题 I have res/layout/toolbar.xml which is: <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:elevation="4dp" style="@style/ToolbarStyle"> </android.support.v7.widget.Toolbar> Here is my usage of toolbar: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas

App compat version for min sdk 9

强颜欢笑 提交于 2019-12-11 01:47:03
问题 I have Android Studio version 2.3.3 and sdk tools version 25.2.5. When I build a new project with min sdk 9 it makes a mistakes and i have to use min sdk 14 for my project. it has anyway to change it to 9 and also use appcompat? my default appcompat version is v7:26.+ I also read other questions but my problem didn't solve. 回答1: Starting with version 26.0.0 of the Support Libraries the minSdk has been bumped to 14 (Android 4.0, see this link). If you have to support platforms down to API

Gradle sync failed - Failed to resolve: appcompat-v7:26

不打扰是莪最后的温柔 提交于 2019-12-11 01:39:47
问题 I use this code in my app/build.gradle. android { compileSdkVersion 26 defaultConfig { applicationId "com.avizhegroup.android.dsmmaps" minSdkVersion 21 targetSdkVersion 26 versionCode 2 versionName "1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } useLibrary 'org.apache.http.legacy' } repositories { maven { url "https://jitpack.io"

ActionBar AppCompat change Tab indicator color

被刻印的时光 ゝ 提交于 2019-12-11 01:36:57
问题 I have seen many posts and answers but still not clear to me, what to do if i have to change Tab indicator color without using Android Asset Studio public class MainActivity extends ActionBarActivity implements android.support.v7.app.ActionBar.TabListener{ private ViewPager tabsviewPager; private TabsAdapter mTabsAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tabsviewPager = (ViewPager)

appcompat_v7 and fragment_main.xml?

混江龙づ霸主 提交于 2019-12-10 20:12:39
问题 I've updated my eclipse and ADT Plugin from v22.3 to v22.6 recently and recognised some big changes. Whenever I create a new Android Application Project there appears a new appcompat_v7 library which wasn't present on v22.3 plugin and also a fragment_main.xml file which as I understand is meant to replace activity_main.xml file. Why is that? Why is the activity_main.xml file not preferred for activity layout directly anymore and why appcompat library is now included in every project as a

XamarinForms AppCompat OnOptionsItemSelected

荒凉一梦 提交于 2019-12-10 18:45:25
问题 I have recently updated xamarin forms to 1.5.1-pre1 so that I can use the beautiful AppCompat themes. It works and looks very nice. I do have one problem, in my old FormsApplicationActivity I used to override the OnOptionsItemSelected method to intercept when the user was clicking on the back arrow icon and do some viewmodel cleanup. Apparently this method is not being called after using the FormsAppCompatActivity. How can I intercept the "soft" back button press (toolbar icon not hard back

Android Studio Build error with AppCompat library newbie q

萝らか妹 提交于 2019-12-10 17:49:30
问题 I couldn't find a thread exclusive to studio so I apologize if this is a dup. I am new to android studio and have a basic problem. I have all the most recent support libraries installed. I am attempting to use the AppCompat library but it is giving me an error on this line of the styles.xml file. <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> The errors are as follows: Gradle: Execution failed for task ':FeedBackUser

After updating AppCompat library to appcompat:1.1.0-alpha03 Locale configuration is not working anymore

眉间皱痕 提交于 2019-12-10 17:14:13
问题 After updating implementation 'androidx.appcompat:appcompat:1.1.0-alpha02' to implementation 'androidx.appcompat:appcompat:1.1.0-alpha03' locale settings was not working anymore, spent half day to figure out that library was the actual problem. Is there another NEW way for locale setting or workaround, or is it just a bug in the library and should just wait for another version with bugfix? 来源: https://stackoverflow.com/questions/55355775/after-updating-appcompat-library-to-appcompat1-1-0

TextInput layout turns editext into red on setting error

你说的曾经没有我的故事 提交于 2019-12-10 16:59:38
问题 I have a layout, whenever i press submit button and set error on text input layout it turns the editText into red but i hadn't set any color on editText on set error. Basically i just wanted to give the error string below the editText and not to turn editText into red on setting the error. My Fragment code is as follows, public class SignIn extends Fragment implements View.OnClickListener { TextInputLayout edEamil,edPassword; @Override public View onCreateView(LayoutInflater inflater,