android-support-library
Setting span size of single row in StaggeredGridLayoutManager
You can use the setFullSpan method. In this way the item will layout using all span area. That means, if orientation is vertical, the view will have full width; if orientation is horizontal, the view will have full height. Something like this: public final void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) viewHolder.itemView.getLayoutParams(); … Read more
Failed to resolve com.google.android.gms play-services-auth:11.4.0
Failed to resolve com.google.android.gms play-services-auth:11.4.0 . Add maven { url “https://maven.google.com” } to your root level build.gradle file allprojects { repositories { jcenter() maven { url “https://maven.google.com” } } } This maven repo is required starting from 11.2.0. You can also use the google() shortcut but check the requirements before using it. Also pay attention … Read more
FragmentTabHost graphical layout doesn’t render
I had the same rendering problem as well as compilation error. I fixed the problem by finding that I was not passing Fragment when i was creating Addtab. You must pass atleast one fragment on mTabHost.addTab. Below is the working code. private FragmentTabHost mTabHost; mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost); mTabHost.setup(HomeActivity.this, getSupportFragmentManager(), android.R.id.tabcontent); mTabHost.addTab(mTabHost.newTabSpec(“home”).setIndicator(“Home”), HomeFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(“mysheets”).setIndicator(“MySheets”)); mTabHost.addTab(mTabHost.newTabSpec(“bookmarks”).setIndicator(“Bookmarks”));
android.support.v7 with `ActionBarActivity` no menu shows
Try pressing the MENU button on your device or emulator, and see if they appear in the overflow. If they do, then the problem is that your <menu> XML needs to change. Menu XML that works with ActionBarSherlock and the native API Level 11+ action bar will not work with the AppCompat action bar backport. … Read more
IDE “Cannot Resolve @style/Theme.Appcompat” when using v7 compatibility support theme
I had this same issue. Sounds like you have the V7 jar file compiling fine but you are probably missing the xml resource needed.You need to manually include the ‘Theme.xml’ provided with the V7 package. Here is what I did to fix it. Look under:Adding libraries with resources http://developer.android.com/tools/support-library/setup.html The directions provided here aren’t very … Read more
Difference between androidx and com.android.support
All the support libraries are dropping the v4 v7 v12 v13 etc tags and everything is refactored into the androidx packages. They are essentially the same but for future reference androidx will be the library that we should use in our apps. Android studio 3.2 canary that comes out this week (week of May 14, … Read more