android-support-library

CoordinatorLayout ignores margins for views with anchor

試著忘記壹切 提交于 2020-01-01 03:55:25
问题 Given I'm using a layout like this: <android.support.design.widget.CoordinatorLayout android:id="@+id/main_content" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/flexible_space_image_height"

Support library for text color behaviour of API 26?

霸气de小男生 提交于 2019-12-31 03:34:26
问题 API 26 introduces an advanced color calculation for ?textColorPrimary based on ?colorForeground . It makes use of states, primaryContentAlpha and disabledAlpha . sdk/platforms/android-26/data/res/color/text_color_primary.xml : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:alpha="?attr/disabledAlpha" android:color="?attr/colorForeground"/> <item android:alpha="?attr/primaryContentAlpha"

Failed to resolve: com.android.support:design-v7:27.1.1

烈酒焚心 提交于 2019-12-31 01:56:26
问题 I am using Android Studio 3.1.3. Gradle build sync failed. I used following method but there is no use of it. If there is any solution please tell me maven { url "https://maven.google.com" } Invalidate restart & caches multiDexEnabled true Adding mavenLocal() and mavenCentral() This is module level build.gradle file: android { compileSdkVersion 27 defaultConfig { applicationId "com.developers.a_g.designapp" minSdkVersion 15 targetSdkVersion 27 buildToolsVersion '27.1.1' versionCode 1

When using compile 'com.google.android.support:wearable:2.0.4' I get the error below, but I am not using 26.0.0

时光毁灭记忆、已成空白 提交于 2019-12-30 11:16:27
问题 When using compile 'com.google.android.support:wearable:2.0.4' (the latest version of com.google.android.support:wearable ) in my Wear app's build.gradle file, I get the error below, but I am not using 26.0.0. What should I do? Even if I add compile 'com.android.support:wear:26.0.0' it still fails. Error in the project's gradle file: Error:(22, 13) Failed to resolve: com.android.support:wear:26.0.0 <a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:/...

The method getChildFragmentManager() is undefined

僤鯓⒐⒋嵵緔 提交于 2019-12-30 08:30:51
问题 I have a SherlockFragmentActivity, this Activity have a SectionsPagerAdapter and a ViewPager. When I call the constructor of the SectionsPagerAdapter with getChildFragmentManager() method, it shows me this error message: The method getChildFragmentManager() is undefined for the type ViewPagerActivity This is my code: public class ViewPagerActivity extends SherlockFragmentActivity implements OnPageChangeListener, OnQueryTextListener{ private SectionsPagerAdapter sectionsPagerAdapter; private

Set SearchView clear button color

怎甘沉沦 提交于 2019-12-30 08:08:12
问题 I am creating a searchview in the toolbar using onCreateOptionsMenu , but can't get the clear X button to initially be white. It becomes white when starting to type letters. It also stays white after clearing. @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.responsible_menu, menu); SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchView searchView = (SearchView) menu

com.android.support:appcompat-v7 and design version 23.2.0 crash parcel error

不问归期 提交于 2019-12-30 07:13:07
问题 I'm using in my app several libraries from android support and i update them when they are available. During the test of the version 23.2.0, i've got a crash when i change the app permissions on android 6. As you know, when the user disable a permission, the app is recreated (same way as when the device rotate) and your parcelable objects are saved and restored from a bundle. With the version 23.2.0, when the app is recreated, i've got a parcel error. I think that this error is not from my

Generate APKLIB of compatibility-v7-appcompat

无人久伴 提交于 2019-12-30 06:43:10
问题 I want to start using the new ActionBar of the appcompat-v7 support library, and I'm using maven . I tried to create an apklib. These are the steps I followed: Create a ZIP file of the project android-sdks/extras/android/support/v7/appcompat Rename the ZIP file with an APKLIB extension. Install the APKLIB file into my local repository: C:....m2\repository\android\support\compatibility-v7-appcompat\18>mvn install:install-file -Dfile=appcombat.apklib -DgroupId=android.support -DartifactId

RecyclerView inside ScrollView, some items are not shown

Deadly 提交于 2019-12-30 05:46:08
问题 I had a RecyclerView in ScrollView like this: <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <!--other stuff--> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone"/> </LinearLayout> <!--other stuff--> </ScrollView> And the RecyclerView 's item is a RelativeLayout , inside of which

SnackBar from top. Is this possible?

北慕城南 提交于 2019-12-30 04:06:26
问题 I wanted to provide the SnackBar animation from top, instead of the regular behavior that displays the SnackBar from bottom. Is this easily hackable? 回答1: No it is not possible. The documentation states that They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time. You could use a third part library, like Crouton for instance 回答2: it is possible. check this