草庐IT

true_type

全部标签

android - 将冒号添加到 InputType.TYPE_CLASS_NUMBER 键盘

如何将冒号(:)添加到输入类型InputType.TYPE_CLASS_NUMBER的软键盘目前我有以下代码:NumberKeyListenerkeyListener=newNumberKeyListener(){publicintgetInputType(){returnInputType.TYPE_CLASS_NUMBER;}@Overrideprotectedchar[]getAcceptedChars(){returnnewchar[]{'0','1','2','3','4','5','6','7','8','9','.',':','-',','};}};mytext.setK

android - Skype 视频聊天 URI 中的视频设置为 "true",但通话开始时未启用视频

我正在使用他们网站上的SkypeAPI:skypeapir/uriforvideocall它表示以下URI“在Skype上调用其他人,并自动打开调用发起者的视频”:skype:skypeUserName?call&video=true当我启动Intent时,它会成功调用电话,但默认情况下在任何一部手机上都未启用视频。我的一个怀疑可能是问号被剥离后的所有内容。这就是我传递它的方式:staticStringskypeURI="skype:stablesentryremote?call&video=true";publicvoidinitiateSkypeUri(ContextmyConte

android - 当 state_pressed = true 时更改 <selector> 中的文本大小

我想要这个而且这个好像不支持了。我想知道是否有另一种方法可以在按下时增加文本大小(在xml中)?非常感谢! 最佳答案 更新代码--创建您自己的dimens.xml文件,然后像这样在选择器上设置它10dp然后在java代码中使用-textView.setOnTouchListener(newOnTouchListener(){@OverridepublicbooleanonTouch(Viewv,MotionEventevent){switch(event){caseMotionEvent.ACTION_DOWN:textView.s

android - 无法解析 AGPBI : {"kind" :"error" ,"text":"String types not allowed

我是androidstudio的新手,正在构建我的第一个项目。发生以下错误:AGPBI:{"kind":"error","text":"Stringtypesnotallowed(at\u0027android:textColor\u0027withvalue\u0027\u0027).","sources":[{"file":"/Users/AndroidStudioProjects/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.4.0/res/values/values.xml","

android - 等效替换已弃用的 Sensor.TYPE_ORIENTATION

我正在寻找一种解决方案来替代已弃用的Android传感器Sensor.TYPE_ORIENTATION。报告最多的解决方案是结合Sensor.TYPE_ACCELEROMETER和Sensor.TYPE_MAGNETIC_FIELD,然后使用SensorManager#getRotationMatrix计算旋转矩阵。并使用SensorManager#getOrientation获得欧拉角.另一个报告的解决方案是使用Sensor.TYPE_ROTATION_VECTOR,它也通过使用SensorManager#getOrientation以旋转矩阵和欧拉角结束不幸的是,在旋转移动设备时,

android - 如何设置 setStackFromEnd(true);在用于 Recyclerview 的 GridLayoutManager 中?

我想要从上次加载数据的网格布局,因为我使用了以下代码GridLayoutManagerrecyclerViewLayoutManager=newGridLayoutManager(getActivity(),3);//LinearLayoutManagerrecyclerViewLayoutManager=newLinearLayoutManager(getActivity());recyclerViewLayoutManager.setStackFromEnd(true);lv_explore.setLayoutManager(recyclerViewLayoutManager);它

android - 数据绑定(bind)中的 msg :Cannot find the getter for attribute 'android:text' with value type java. lang.String?

我正在尝试在edittext中使用数据绑定(bind),早上它工作正常但突然出现错误:****/databindingerror****msg:Cannotfindthegetterforattribute'android:text'withvaluetypejava.lang.Stringonandroid.widget.EditText.file:/home/itstym/ApkProjects/Reminder/app/src/main/res/layout/activity_main.xmlloc:20:4-34:40****\databindingerror****第20:4

ANDROID_LOOP = true -- 如何避免 MediaPlayer 使用此元数据标签循环播放音频

我想用MediaPlayer播放设备铃声,但似乎当元数据标记ANDROID_LOOP=true已设置MediaPlayer正在忽略方法setLooping的调用mMediaPlayer.setLooping(false);并在任何情况下循环播放音频。也不会调用onCompletionListener方法。我注意到,无论是否启用循环,即使是像ESMediaPlayer这样的音频应用程序也会循环播放此标签设置为true的音频。所以我的问题是我是否可以让MediaPlayer忽略这个标签临时修改标签,使MediaPlayer不循环播放音频这个问题是围绕铃声产生的,但它当然不是特定于铃声的。有

No converter for [class java.util.LinkedHashMap] with preset Content-Type ‘text/html;charset=UTF-8‘]

记录一下debug日常…前端网页做了个bootstrap表格,使用的是服务器分页方式,服务器返回的数据需要满足以下JSON格式规范:{"total":20,//总共满足条件的数据数量,bootstraptable会根据这个值和你设置pageSize,自动计算出页码"rows":[{"Id":1,"ProductName":"香蕉","StockNum":"100"},{"Id":2,"ProductName":"苹果","StockNum":"200"},{"Id":3,"ProductName":"车厘子","StockNum":"2010"}]}我根据自己的情况自定义了一个返回对象:pub

android:textisselectable 在 TYPE_SYSTEM_ALERT 窗口中不工作

我正在将TextView添加到具有属性android:textisselectable的float窗口。mWindowManager.addView(textView,params);除长按无法复制文本外,一切正常。奇怪的是,它在GalaxyTab中运行良好,但在我拥有的任何其他5英寸手机上却不行。 最佳答案 我认为是版本问题。GalaxyTab的版本高于Honeycomb,而5英寸屏幕可能是Honeycomb或更低版本。试试这段代码:TextViewtextView;StringstringToBeExtracted;intsta