android-design-library

Android: how to use Espresso 2.2.2 with Support 25.0.0?

南楼画角 提交于 2020-01-04 06:15:44
问题 How can I get this working? I read many similar strategies, alas. Using a support lib higher than 23.1.1 fails times and again. dependencies { compile 'com.android.support:design:25.0.0' compile 'com.android.support:support-v4:25.0.0' compile files('libs/slf4j-android-1.5.8.jar') androidTestCompile 'com.android.support:support-annotations:25.0.0' androidTestCompile( 'com.android.support.test:rules:0.5') androidTestCompile( 'com.android.support.test.espresso:espresso-contrib:2.2.2')

Binary XML file line #1: Error inflating class android.support.design.widget.AppBarLayout

那年仲夏 提交于 2020-01-03 19:37:13
问题 Hello Everyone There are many threads avilable in this case ... I was tried everything but no luck . I was new to android background..Iam c# guy,now iam work with xamarin droid...So can anyone explain what is the error.this solution not working only **PRE lolipop devices **. My layout <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="

How to make custom size of FloatingActionButton

孤者浪人 提交于 2020-01-02 00:54:19
问题 FloatingActionButton by default has two sizes (normal and mini). I need another one (bigger than normal). app:fabSize parameter from xml became private int mSize; variable in FloatingActionButton class. The real size will be determined by this function: final int getSizeDimension() { switch(this.mSize) { case 0: default: return this.getResources().getDimensionPixelSize(dimen.fab_size_normal); case 1: return this.getResources().getDimensionPixelSize(dimen.fab_size_mini); } } Because it

What is the reason for white screen on launch of app ? How to avoid it completely?

不问归期 提交于 2020-01-01 12:31:11
问题 I have a simple app in which I am using openssl for some encryption. but I am getting white screen on launch of app for than 5 seconds. Here is my gradle: apply plugin: 'com.android.application' android { signingConfigs { config { keyAlias 'manvish' keyPassword 'manvish' storeFile file('/home/manvish/Android/debug.keystore') storePassword 'manvish' } } compileSdkVersion 25 buildToolsVersion '26.0.2' defaultConfig { applicationId "com.example.manvish.bwssb" minSdkVersion 19 targetSdkVersion 25

How to show unread notification counter on Tabs inside TabLayout?

不想你离开。 提交于 2020-01-01 05:33:08
问题 I am using TabLayout of android support design library. I want to show unread notification counter on the tab with title like below image. How to set unread count on Tab inside TabLayout ? 回答1: Use public TabLayout.Tab setCustomView (int layoutResId) Create a Layout with TextView and Button use this in Custom view. For reference setCustomView Example Hope this will helpful to you. 回答2: Take a look at android-viewbadger... 来源: https://stackoverflow.com/questions/32269517/how-to-show-unread

FloatingActionButton setVisibility() not working

谁都会走 提交于 2020-01-01 04:24:08
问题 I can't hide my FloatingActionButton . Here is my code: XML: <CoordinatorLayout> <AppBarLayout android:id="@+id/appbar"> <CollapsingToolbarLayout> <ImageView/> <android.support.v7.widget.Toolbar /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" app:layout_anchor="@id/appbar" app:layout_anchorGravity="bottom|right|end"/> </CoordinatorLayout> And I'm calling: fab.clearAnimation(); fab.setVisibility(View

AppBarLayout - Layout sometimes invisible once it enters view (even if it's not entered)

百般思念 提交于 2019-12-31 03:52:10
问题 I have a problem where sometimes the AppBarLayout will not show its full content all the time when you play around with it: <android.support.design.widget.CoordinatorLayout 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.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="

How to add submenu items to NavigationView programmatically instead of menu xml

喜欢而已 提交于 2019-12-30 02:17:27
问题 I'm trying to add submenu items to NavigationView programmatically . I'm able to add items into menu but not into submenu Adding items to menu works Menu menu = mNavigationView.getMenu(); menu.add(Menu.NONE, Menu.NONE, index, "Menu Item1"); But adding items to sub menu doesn't work Menu menu = mNavigationView.getMenu(); SubMenu subMenu = menu.addSubMenu("Sub menu title"); subMenu.add(Menu.NONE, Menu.NONE, index, "SubMenu Item1"); 回答1: The trick to call BaseAdapter.notifyDataSetChanged on the

NestedScrollView and WebView height issue

自古美人都是妖i 提交于 2019-12-30 00:08:48
问题 I use new android.support.v4.widget.NestedScrollView and I faced with issue. Here is my layout: <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="250dp"> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="match_parent" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <RelativeLayout android:layout_width="match_parent" android:layout

ArrayIndexOutOfBoundsException while dismissing Snackbar/ViewDragHelper

安稳与你 提交于 2019-12-29 06:47:11
问题 After implementing the new Snackbar in a few of my applications, I am receiving the following error: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(SourceFile:1014) at android.support.design.widget.SwipeDismissBehavior.onInterceptTouchEvent(SourceFile:188) at android.support.design.widget.Snackbar$Behavior.onInterceptTouchEvent(SourceFile:659) at android.support.design.widget.Snackbar$Behavior