但是事与愿违,我们看到的确实下面这种效果(我演示的这个再editText外面报过了TextInputLayout)
我们的初衷是刚进界面,是图1效果,点击EditText控件后,变成图2效果。
下面看我的布局文件(部分)
大致就是LinearLayout内部包裹一个EditText,所以解决这个问题方式就是给EditText的父控件即LinearLayout添加俩个属性
android:focusable="true"
android:focusableInTouchMode="true"
http://www.jcodecraeer.com/plus/list.php?tid=31&TotalResult=61&codecategory=3500&PageNo=2
作者:武安长空
链接:http://www.jianshu.com/p/129f2d73add8
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
<activity
android:name=".TestActivity"
android:configChanges="orientation|keyboardHidden">
activity>
configChanges可以有许多值,比如orientation-屏幕方向发生改变;keyboardHidden-屏幕访问性发生改变,如弹出键盘;screenSize-屏幕尺寸发生改变(API13添加的)等。
Activity配置configChanges后,上面配置的信息发生改变时,Activity不会重建,会执行onConfigurationChanged方法。
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Log.e("aaa","onConfigurationChanged");
}
当界面OverScroll的时候会显示一个阴影。为了达到更好的显示效果,最好禁用系统的overScroll,如上给RecyclerView添加android:overScrollMode=“never”。
public Bitmap getViewImageCache(View view){
view.setDrawingCacheEnabled(true);
view.buildDrawingCache();
Bitmap bitmap = view.getDrawingCache();
if(bitmap == null){
return null;
}
view.destroyDrawingCache();
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),bitmap.getHeight());
}
最近在集成腾讯云直播过程中,使用TXCloudVideoView播放直播的时候,只有声音,没有图像,然后换了其他的播放器,也不能成功播放,让后一遍又一遍研究代码。重写的Demo后,同样的代码,缺可以播放,整整修改,修改,修改,写了4个不同的播放界面,都是这样,纠结3天。
突然,在我的manifest看到我设置了 android:hardwareAccelerated=“false”
然后马上修改为android:hardwareAccelerated=“true”
问题解决
1、整个应用 Application 层,可以选择打开或关闭
2、Activity 层,可以选择打开或关闭
3、Window 层,只能打开(必须在setContentView之前调用)
getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, //
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
4、View 层,只能关闭。也可在XML使用 android:layerType=“software” 来关闭硬件加速
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
注意:在apk的AndroidManifest中,如果指定了minSDKVersion & targetSDKVersion=7,会使得应用无法使用硬件加速进行绘图。
在使用recyclerView中出现的一个问题,什么问题,等我抽空看明白了的
/*****************在输入框中获取啊******************************/
var thumbUrl = bannerImage.attr('src');
var priority = bannerPriority.val();
var linkUrl = bannerLinkUrl.val();
/******************************************/
56ZS5PQ1RF-eyJsaWNlbnNlSWQiOiI1NlpTNVBRMVJGIiwibGljZW5zZWVOYW1lIjoi5q2j54mI5o6I5p2DIC4iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiRm9yIGVkdWNhdGlvbmFsIHVzZSBvbmx5IiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiQ0wiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IlJEIiwic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