上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: package com.music.you.tube.receiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.view.KeyEvent; import com.music.you.tube... 阅读全文
posted @ 2017-04-19 19:14 Alter 阅读(523) 评论(0) 推荐(0)
摘要: <style name="Custom.Widget.EditView" parent="Widget.AppCompat.EditText" > <item name="colorAccent">@color/color_main</item> <!--<item name="colorContr 阅读全文
posted @ 2017-04-19 12:02 Alter 阅读(2031) 评论(0) 推荐(0)
摘要: Intent intent = new Intent(context, A.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity( 阅读全文
posted @ 2017-04-18 17:46 Alter 阅读(2430) 评论(0) 推荐(0)
摘要: public static boolean isGooglePlayServiceAvailable (Context context) { int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context); if  阅读全文
posted @ 2017-03-24 14:57 Alter 阅读(3004) 评论(0) 推荐(0)
摘要: 实时检测耳机插入和拔出: 每当插入和拔出耳机时,系统都会发送Intent广播, 所以,只需要用一个receiver把这个广播intent(获取的action是:“android.intent.action.HEADSET_PLUG”)截获就好。 这个receiver必须要用代码注册,而不能写在man 阅读全文
posted @ 2017-03-24 11:56 Alter 阅读(1364) 评论(0) 推荐(0)
摘要: 在oncreate()中利用view.getWidth()或是view.getHeiht()来获取view的宽和高,看似没有问题,其实他们去得值是0,并不是你想要的结果? 这是为什么呢? 在调用oncreate()方法时,界面处于不可见状态,内存加载组件还没有绘制出来,你是无法获取他的尺寸。 那如何 阅读全文
posted @ 2017-03-08 15:06 Alter 阅读(319) 评论(0) 推荐(0)
摘要: NestedScrollView scroller = (NestedScrollView) findViewById(R.id.myScroll); if (scroller != null) { scroller.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { @O... 阅读全文
posted @ 2017-03-02 10:11 Alter 阅读(12978) 评论(0) 推荐(0)
摘要: 我在编写有关JNI的代码的时候回报这个错误,我在网上搜了相关的资料后,找到了一篇文章解决了这个问题,点击这里查看这篇文章,我在照着这篇文章尝试的时候,总有一些错误,现在我把自己详细的解决流程贴出来,供大家参考。 首先在工程目录下的gradle.properties文件的末尾加上一句:Android. 阅读全文
posted @ 2017-02-16 13:35 Alter 阅读(12337) 评论(0) 推荐(0)
摘要: view.performClick(); 阅读全文
posted @ 2017-02-07 14:56 Alter 阅读(1331) 评论(0) 推荐(0)
摘要: 好像没有现成的api可能获取menu完美方法,只有在创建menu时,用全局的menuItem记下, 在需要修改时修改。 1)全局量: MenuItem gMenuItem=NULL; 2)//创建菜单时keep @Override public boolean onCreatePanelMenu(i 阅读全文
posted @ 2017-01-11 13:15 Alter 阅读(287) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页