草庐IT

user_items

全部标签

android - 失败 [INSTALL_FAILED_USER_RESTRICTED : Invalid apk] in android

我正在使用AndroidStudio3.0.1。当我尝试运行应用程序时INSTALL_FAILED_USER_RESTRICTED:Invalidapk发生错误。我还禁用了InstantRun。我再次运行应用程序,但出现相同的错误。04/0410:59:08:Launchingapp$adbpushG:\Android\Fundraiser\BuyForFund\app\build\outputs\apk\debug\app-debug.apk/data/local/tmp/com.android.buyforfund$adbshellpminstall-t-r"/data/local

android - Android 中的 simple_list_item_2

在使用simple_list_item_1创建了一些菜单(效果很好)后,我尝试用simple_list_item_2替换它,但我的系统抛出异常...现在我想知道如何为我的列表创建这样一个两个不同大小的行条目...初学者有什么陷阱吗?有人可以帮我解决我的(小!?)问题吗?我的代码是这样的:ListAdapterlistAdapter=newArrayAdapter(this,android.R.layout.simple_list_item_2,fileNames);setListAdapter(listAdapter);我的String[]fileNames存储所有要按升序显示的字符串

Decode user requirements to design well-architected applications

So,oneofmyfavoritewritersandthoughtleadersintheindustry,MarkSchwarz,whoisanenterprisestrategisthereatALS,inhisbook,heactuallysaysthatitistimeforthewallbetweenITandbusinesstocomedown.HesaysthatoldbusinessmodelslongagopittedITpeopleagainstbusiness.Sohecallsit"pittingthenerdsagainstthesuits."Andhesayst

android - RecyclerView 安卓 : Getting an item at a particular position

有没有办法在适配器外部的特定位置获取RecyclerView的项目。例如在ListView中我们可以这样做:listView.getItem(position);我们可以用RecyclerView做到这一点吗?以及提供的数据列表的顺序是否保持不变? 最佳答案 您可以将自己的方法添加到RecyclerView,或者我建议使用RecyclerView.Adapter本身。例如,对于ListView,您有:@OverridepublicObjectgetItem(intposition){returnlistData.get(positi

flex布局——align-items属性垂直之共有flex-start、center、flex-end& justify-content属性水平之space-around、space-between

flex布局——align-items属性垂直之共有flex-start、center、flex-end&justify-content属性水平之space-around、space-between对容器进行display:flex布局之后,可通过justify-content来调整容器中子元素整体的布局的位置,其值分别有如下几个:注:以下情况均由主轴为从左到右方向进行,其从下到上的主轴情况原理类似flex-start(默认值)即默认状态下的在主轴的左边位置,页面代码如下:/*align-items:flex-start;*/justify-content:flex-start;效果-水平-开

android - Delphi 获取android combobox 选中的item 文本

我有一个组合框,里面有很多项目,我必须进入一个名为所选项目名称的变量。vara:string;begina:=ComboBox1.Text;end;这是我在DelphiVCL应用程序中使用的方法,并且有效。在这里,我正在使用Firemonkey和Android进行开发,我没有text属性。如何获取组合框中所选项目的文本? 最佳答案 在FireMonkey中的工作方式与在VCL代码中的工作方式相同-使用TComboBox.Items。TComboBox.ItemIndex告诉您当前选择了哪一个(或允许您设置选择)。阅读:ifCombo

安卓 4.3 : How can I check if user has lock enabled?

如果用户没有锁定屏幕或仅启用滑动,我希望我的应用程序有不同的行为(而不是存储内容)。这里的最佳答案:checkwhetherlockwasenabledornot已被编辑为表示代码在升级到Android4.3后不再有效。有没有办法在Android4.3上检测到这个? 最佳答案 好的,看来经过一些思考是可能的。不是最好的解决方案,但至少它适用于我们尝试过的设备:Classclazz=Class.forName("com.android.internal.widget.LockPatternUtils");Constructorcons

Android 查看寻呼机 : how to distinguish user and programmatic swipes?

我使用ViewPager.setCurrentItem()每隔几秒自动滑动到下一页。我想在用户开始滑动自己时立即禁用它。据我所知,无论滑动是否来自用户,OnPageChangedListener都会以相同的方式被触发。看起来beginFakeDrag()可以提供帮助,但它需要拖动指定数量的像素,这是不切实际的。 最佳答案 你熟悉SCROLL_STATE_DRAGGING吗??它表示寻呼机当前正在被用户拖动。示例mPager.setOnPageChangeListener(newOnPageChangeListener(){@Over

安卓 : How change focus on form with out user action?

我有一个包含2个字段的表单,首次登录后,我将邮件存储在SharedPreferences中,并在用户再次启动应用程序时恢复,但是如何将焦点设置在PassField上呢?看到邮件已满不是很好,但焦点仍在邮件字段上。谢谢 最佳答案 在密码字段上调用​​requestFocus()。http://developer.android.com/reference/android/view/View.html#requestFocus() 关于安卓:Howchangefocusonformwitho

android - 在GridView中设置item长按监听

我想添加一个项目长按监听器,它会将选中的图像设置为墙纸。我从网络上获取图像并在GridView中显示它们。我的网格Activity如下所示。我已经有一个点击监听器来显示全屏图像。publicclassImageGridActivityextendsBaseActivity{String[]imageUrls;DisplayImageOptionsoptions;@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);requestWindowFeature(Wind