草庐IT

supports-screen

全部标签

android - 点燃火 : Minimizing the slim gray bar at the bottom of the screen?

在KindleFire上运行的应用程序底部,有一个细长的灰色条,上面有主页按钮、后退按钮、菜单按钮和搜索按钮。我见过一些应用程序在X秒未使用后自动最小化这个灰色条(以这种方式它甚至更slim,并且只有一个按钮可见:最大化按钮)。这是如何实现的?对于我的应用程序,灰色条在应用程序的整个持续时间内保持最大化。 最佳答案 Howisthisaccomplished?对于请求全屏的Activity(例如,list中android:theme="@android:style/Theme.NoTitleBar.Fullscreen"元素上的),

android - list 合并失败 : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com. android.support

我有一个问题-我在AndroidStudio中导入了项目。当我运行该项目时,出现以下错误:错误:任务“:driverNotes:processDebugManifest”执行失败。Manifestmergerfailed:uses-sdk:minSdkVersion9cannotbesmallerthanversionLdeclaredinlibrarycom.android.support:support-v4:21.0.0-rc1android{compileSdkVersion19buildToolsVersion'19.1.0'defaultConfig{minSdkVersi

java - Android - android.widget.TabHost 无法转换为 android.support.v4.app.FragmentTabHost

我是Android新手。我正在尝试设置一个简单的TabHostView。这是我的xml文件:这是我的java代码:importandroid.os.Bundle;importandroid.support.v4.app.FragmentActivity;importandroid.support.v4.app.FragmentTabHost;publicclassTabhostextendsFragmentActivity{privateFragmentTabHosttabHost;@OverrideprotectedvoidonCreate(BundlesavedInstanceSt

java.lang.ClassCastException : android. widget.RelativeLayout$LayoutParams 无法转换为 android.support.v7.widget.RecyclerView$LayoutParams

我使用androidRecycleView来替换ListLiew。我想做的是在我的列表项中的一个ImageView上启用onClick(想象这个列表项有一个图像和一个文本,我想向图像添加一个onClick监听器而不是列表项本身)我使用以下布局xml创建一个RecycleView适配器:和我的onCreateViewHolder@OverridepublicViewHolderonCreateViewHolder(ViewGroupparent,intviewType){Viewv=LayoutInflater.from(parent.getContext()).inflate(R.la

java.lang.ClassCastException : android. widget.LinearLayout 无法转换为 android.support.v7.widget.Toolbar

我试图按照这里的示例向工具栏添加阴影https://stackoverflow.com/a/26904102/4273056我的工具栏在Activity中@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);Toolbartoolbar=(Toolbar)findViewById(R.id.toolbar);setSupportActionBar(toolbar);}这是我添加工具栏的x

android - support-v4.Fragment 与 Fragment

如果我支持SDK15,我应该使用support-v4Fragment而不是Fragment吗?我正在尝试使用FragmentSupport.shouldShowRequestPermissionRationale(this)并实现新的M权限模型,但它需要一个fragment。例如:importandroid.support.v4.app.Fragment;publicclassMyBaseFragmentextendsFragment{public...{if(FragmentCompat.shouldShowRequestPermissionRationale(this)){//ER

安卓游戏: Drag one image at a time into screen from a group of images

我在屏幕底部堆叠了5张图像。我的游戏目的是拖动这些图像并在特定条件下将它们连接起来。(有点像拼图游戏)我使用了以下代码vartouchListener=newCCEventListenerTouchAllAtOnce();touchListener.OnTouchesEnded=OnTouchesEnded;touchListener.OnTouchesMoved=HandleTouchesMoved;AddEventListener(touchListener,this);voidHandleTouchesMoved(Listtouches,CCEventtouchEvent){fo

android - 错误 : package android. support.v4.view 不存在

我正在使用lottie库来响应native。我只是使用npm安装它并使用reactnativelink链接它但是当我尝试构建它时我在lottie的类error:中遇到错误android.support.v4.view包不存在这些是我在应用程序gradle中的依赖dependencies{compileproject(':lottie-react-native')compileproject(':react-native-vector-icons')compileproject(':react-native-view-overflow')compilefileTree(include:[

android - 管道 : Minimum supported Gradle version is 4. 10.1。当前版本是 4.4

我已经更新了顶级build.gradle文件:来自classpath'com.android.tools.build:gradle:3.1.4'到classpath'com.android.tools.build:gradle:3.3.0'现在无法在Bitbucket-Pipelines上构建项目:错误是:FAILURE:Buildfailedwithanexception.*Where:Buildfile'/opt/atlassian/pipelines/agent/build/app/build.gradle'line:1*Whatwentwrong:Aproblemoccurre

android - java.lang.ClassCastException : android. support.v4.app.NoSaveStateFrameLayout 无法转换为 com.google.android.maps.MapView

这是我的Activity代码publicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.map);GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());mapView=(MapView)findViewById(R.id.map);GoogleMapmap=((SupportMapFragment)getSupportFragmentMan