草庐IT

Support-v

全部标签

android - 膨胀类 android.support.v4.view.ViewPager 时出错

我一直在尝试为我在上运行的应用程序创建寻呼机我根据thisblogpost写了我的代码.寻呼机Activity的XML:适配器代码:publicclassMyPagerAdapterextendsPagerAdapter{@OverridepublicintgetCount(){//TODOAuto-generatedmethodstubreturn2;}@OverridepublicbooleanisViewFromObject(Viewarg0,Objectarg1){return(arg0==((View)arg1));}@OverridepublicvoiddestroyIte

android - 如何将全局自定义样式应用于android.support.design.widget.TextInputEditText?

我在style.xml中定义了我的AppTheme,我在其中为所有应用程序的TextView、EditText全局应用自定义样式,按钮等现在我想对android.support.design.widget.TextInputEditText做同样的事情,但是怎么做呢?它不扩展EditText,因此样式被忽略。这是我得到的:@color/primary@color/primary@color/accent@style/App.TextView@style/App.EditText@style/App.Button.Primary@color/textsans-serif-light@di

android - 膨胀类 android.support.v7.widget.AppCompatEditText 时出错

我正在尝试将android.support.design.widget.TextInputLayout与EditText一起用于密码输入。一旦密码输入出现问题,TextInputLayout应显示错误消息。WheniamusingEditText,thereisacrashinsetError(string).日志:FatalException:java.lang.RuntimeException:UnabletostartactivityComponentInfo{com.infibond.infi/com.infibond.account.login.LoginActivity}:

Android _ import android.support.v7.graphics 无法解决?

我在我的项目中添加了appcompat_v7但我无法导入:importandroid.support.v7.graphics.Palette;我能做什么?我在这个jar中看到我的android-support-v7-appcompat.jar包android-support-v7.appcompat是空的.如何获得子类? 最佳答案 在你的gradle中使用它implementation'com.android.support:palette-v7:22.2.0' 关于Android_im

android - 程序类型已经存在 : android. support.v4.app.INotificationSideChannel$Stub$Proxy

我知道它可能看起来像ThisQuestion但我无法用提出的解决方案修复它,我也无法对此发表评论。错误是:Programtypealreadypresent:android.support.v4.app.INotificationSideChannel$Stub$ProxyMessage{kind=ERROR,text=Programtypealreadypresent:android.support.v4.app.INotificationSideChannel$Stub$Proxy,sources=[Unknownsourcefile],toolname=Optional.of(D

android - 设置 android-support-v7-appcompat 后 R.java 丢失

我正在尝试更改我的Eclipse项目,使其向后兼容Android2.1。我按照here中的说明设置支持库但是在我将Library项目附加到我的项目之后,gen目录中的R.java消失了。另外,我在控制台中遇到了一些错误,例如:[2013-09-0200:08:26-gitarshopAndroidClient]/usr/local/external/android-sdk-linux/extras/android/support/v7/appcompat/res/values-v14/styles_base.xml:24:error:Errorretrievingparentforit

android - 以编程方式隐藏 android.support.v7.widget.Toolbar

在我的Activity中我会:setSupportActionBar(toolbar);其中toolbar是android.support.v7.widget.Toolbar的实例在此之后是否有任何方法可以编程方式隐藏和显示工具栏小部件?我已经试过了toolbar.setVisibility(View.INVISIBLE);但这只会让它不可见并且它仍然占用空间,所以Activity的内容在它之后开始,我在标题中看到的是空白。 最佳答案 INVISIBLE仅隐藏View。GONE但是,将隐藏View并防止它占用任何空间。toolbar

android - 以下类无法实例化 android.support.v7.widget.AppCompatTextView

这是我对build.gradle(app)的依赖compilefileTree(include:['*.jar'],dir:'libs')androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{excludegroup:'com.android.support',module:'support-annotations'})compile'com.firebaseui:firebase-ui-auth:2.3.0'compile'com.android.support:appcompat-v7

android - 需要 android.support.v4.app.fragment

我希望你能帮我解决这个问题。我是安卓新手我想解决这个问题,但我做不到声明这个方法时的问题publicvoidonNavigationDrawerItemSelected(intposition){//slidemenuedeclarationFragmentfragment=null;switch(position){case0:fragment=newmenu1_Fragment();break;case1:fragment=newmenu2_Fragment();break;case2:fragment=newmenu3_Fragment();break;default:break

android - 迁移到 AndroidX 后,错误膨胀类 android.support.design.widget.AppBarLayout

使用AndroidStudio将我的项目迁移到AndroidX后(并手动修复了很多导入错误),我没有遇到任何编译错误,但是当应用程序启动时我遇到了崩溃:Errorinflatingclassandroid.support.design.widget.AppBarLayout.布局文件中有问题的行是:我在build.gradle中的依赖项是:dependencies{deflifecycle_version='2.1.0-alpha02'//usedbelow--willbedifferentforandroidx(migrated2019-02-04)implementationfil