草庐IT

progress_bar_length

全部标签

Android 模拟器 (Android Studio) 主页按钮不工作并提供 logcat - I/WindowManager : Not starting activity because user setup is in progress

从AndroidStudio启动了模拟器,但它的主页按钮不起作用。当我按下主页按钮时,在logcat中我可以看到I/WindowManager:Notstartingactivitybecauseusersetupisinprogress:Intent{act=android.intent.action.MAINcat=[android.intent.category.HOME]flg=0x10200000(hasextras)}当使用键盘快捷键(键盘主页按钮)时,也会发生同样的情况(相同的logcat)。我多次重启模拟器和我的机器,但没有帮助。我想要实现的是通过长按主页按钮杀死我的应

android - android 2.3平台如何添加Action bar?

在我的应用程序中,我想创建一个操作栏作为我的应用程序图标和一个View控件。我引用了很多教程和示例来创建操作栏,但它们都有大量代码。我还阅读了ActionBarSherlock但这需要minsdkversion15来编译库。因为我是android新手,所以我需要一步一步的教程来创建一个简单的操作栏。如果您知道使用xml创建操作栏的简单教程,请发布您的答案。 最佳答案 我已经使用这个库为2.2+应用程序添加了操作栏:https://github.com/johannilsson/android-actionbar我发现它易于使用且视觉

android - AppCompat Action Bar 库不显示添加的 fragment

编辑:如果我扩展FragmentActivity而不是ActionBarActivity我的布局再次显示(没有ActionBar当然)。ActionBar在4.x设备上按预期工作,但在我的2.3设备上我得到的只是ActionBar和它下面的空白屏幕。Fragment似乎没有被添加到Activity中。主题.xml@style/Widget.ActionBarthemes-v11.xml@style/Widget.ActionBarstyles.xml@color/actionbar_background@color/actionbar_backgroundActivityonCreat

安卓 : Toolbar status bar overlapping

我正在创建一个带有Lollipop工具栏和半透明状态栏的应用程序,以使状态栏也有颜色。它与真正的属性(property)。只是工具栏现在和状态栏重叠在一起,看起来很乱。将工具栏置于状态栏下方并保持窗口半透明状态的选项是什么?代码fragment:......truefalse...Activity中使用的工具栏代码:提前致谢。 最佳答案 正如病毒所说的那样,答案就在这里:Toolbaroverlappingbelowstatusbar简单的添加属性android:fitsSystemWindows="true"进入xml项,它将正常

Android Status Bar Notifications - 选择通知时打开正确的 Activity

我遇到了一个问题,即单击通知后无法打开/转到正确的Activity。我的通知代码(位于扩展服务的类中):Contextcontext=getApplicationContext();CharSequencecontentTitle="Notification";CharSequencecontentText="NewNotification";finalNotificationnotifyDetails=newNotification(R.drawable.icon,"Consideryourselfnotified",System.currentTimeMillis());Inten

安卓 : Full Screen Activity with Title bar

我想将我的Activity设置为带标题栏的全屏,我该怎么做?谢谢 最佳答案 在styles.xml中:falsetrue在您的mainfest中引用您的自定义样式:老实说,我自己还没有测试过这种组合。 关于安卓:FullScreenActivitywithTitlebar,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/12754897/

android - 应用程序 :showAsAction ifRoom is not working on appcompat action bar

我有一个包含以下菜单项的操作栏;问题是我的搜索按钮没有显示在操作栏上,但文本显示在溢出中。我的操作栏有足够的空间我正在使用"@style/Theme.AppCompat.Light"谁能帮帮我? 最佳答案 请尝试使用android:showAsAction="ifRoom|withText"而不是app:showAsAction="ifRoom|withText" 关于android-应用程序:showAsActionifRoomisnotworkingonappcompataction

android - Android/Xamarin 项目中的自定义主题 - Action Bar 的中心标题文本

我在Android/Xamarin项目中有自定义主题。我不能做的是:将标题设置到中间(并删除图标)添加带有菜单选项的菜单按钮(例如按钮设置)我试过设置属性->重力居中,但它没有用。@style/MyActionBar@color/main_orange_color@style/AgrippaTheme.TitleTextStyle@color/main_black_colorcenter_vertical|center_horizontal 最佳答案 您必须通过静态类中的静态方法以编程方式执行此操作publicstaticvoidS

安卓 : Minimum Length of password in edittext

在android中,有什么简单的方法可以在edittext中设置最小密码长度?xml中只有最大长度选项,没有最小长度选项。设置ems和宽度适合限制长度的选项,但是什么时候设置最小长度呢???我在文档中找到了这个:DevicePolicyManagermDPM;ComponentNamemDeviceAdminSample;intpwLength;...mDPM.setPasswordMinimumLength(mDeviceAdminSample,pwLength);但是还有比这更简单的方法吗? 最佳答案 当用户点击提交时,您可以对

android - Robolectric - screen_action_bar.xml 第 #-1 行(抱歉,尚未实现): Error inflating class <unknown>

我正在使用Robolectric,但在创建Activity时出现以下错误。我正在使用2.3-Snapshot-androidTestCompile('org.robolectric:robolectric:2.3-SNAPSHOT')android.view.InflateException:XMLfilejar:/Users/user/.m2/repository/org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.jar!/res/layout/screen_action