我正在测试新的Android Lollipop上的libstreaming,这个代码在之前的版本中运行,似乎启动了异常.
try {
mMediaRecorder = new MediaRecorder();
mMediaRecorder.setCamera(mCamera);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mMediaRecorder.setVideoEncoder(mVideoEncoder);
mMediaRecorder.setPreviewDisplay(mSurfaceView.getHolder().getSurface());
mMediaRecorder.setVideoSize(mRequestedQuality.resX,mRequestedQuality.resY);
mMediaRecorder.setVideoFrameRate(mRequestedQuality.framerate);
// The bandwidth actually consumed is often above what was requested
mMediaRecorder.setVideoEncodingBitRate((int)(mRequestedQuality.bitrate*0.8));
// We write the ouput of the camera in a local socket instead of a file !
// This one little trick makes streaming feasible quiet simply: data from the camera
// can then be manipulated at the other end of the socket
mMediaRecorder.setOutputFile(mSender.getFileDescriptor());
mMediaRecorder.prepare();
mMediaRecorder.start();
} catch (Exception e) …Run Code Online (Sandbox Code Playgroud) 我在drawable目录中有一个960x1440大小的图像文件.当应用程序启动时,图像不会作为背景加载,我在logcat中看到:
位图太大而无法上传到纹理中(2880x4320,max = 4096x4096)
如果图像为960x1440,为什么会显示2880x4320?
位图通过xml加载:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/launcher_bg"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
Run Code Online (Sandbox Code Playgroud) 我正在使用流程图.js库来获取流程图的SVG 渲染。我需要在带有动态引导程序面板的弹出窗口中包含流程图渲染,但结果一团糟(盒子上的标签和小渲染:
我的代码是:
<div class="panel panel-default">
<div class="panel-body">
<div id="diagram"></div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
var diagram = flowchart.parse('st=>start: Start:>http://www.google.com[blank]\n' +
'e=>end:>http://www.google.com\n' +
'op1=>operation: My Operation\n' +
'op2=>operation: Stuff|current\n' +
'sub1=>subroutine: My Subroutine\n' +
'cond=>condition: Yes \n' + // use cond(align-next=no) to disable vertical align of symbols below
'or No?\n:>http://www.google.com\n' +
'c2=>condition: Good idea|rejected\n' +
'io=>inputoutput: catch something...|request\n' +
'\n' +
'st->op1(right)->cond\n' +
'cond(yes, right)->c2\n' + // conditions can also be redirected like cond(yes, …Run Code Online (Sandbox Code Playgroud) 我需要在Android上按最新排序的视频库.使用下面的代码,排序是最上面的最旧视频和最后的最新视频.所以我需要在获取新录制的视频之前滚动整个列表.
任何解决这个问题的想法?
private void init_phone_video_grid() {
System.gc();
String[] proj = { MediaStore.Video.Media._ID,
MediaStore.Video.Media.DATA,
MediaStore.Video.Media.DISPLAY_NAME,
MediaStore.Video.Media.SIZE };
videocursor = managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
proj, null, null, null);
count = videocursor.getCount();
videolist = (ListView) findViewById(R.id.PhoneVideoList);
videolist.setAdapter(new VideoAdapter(getApplicationContext()));
videolist.setOnItemClickListener(videogridlistener);
}
private OnItemClickListener videogridlistener = new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position,
long id) {
System.gc();
video_column_index = videocursor
.getColumnIndexOrThrow(MediaStore.Video.Media.DATA);
videocursor.moveToPosition(position);
String filename = videocursor.getString(video_column_index);
String videoinfo[] = new String[2];
int videoId = videocursor.getInt(videocursor.getColumnIndexOrThrow(MediaStore.Video.Media._ID));
Cursor videoThumbnailCursor = managedQuery(MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI,
thumbColumns, …Run Code Online (Sandbox Code Playgroud) 我正在单元格中具有以下标记的表格上测试 JAWS 屏幕阅读器:
<center><i class="fa fa-check fa-1" title="MyTitle" aria-hidden="true" style="color:green" aria-label="read me"></i></center>
Run Code Online (Sandbox Code Playgroud)
我注意到屏幕阅读器无法“输入”上面的单元格(由于 )aria-hidden,所以我将其删除:
<center><i class="fa fa-check fa-1" title="MyTitle" style="color:green" aria-label="read me"></i></center>
Run Code Online (Sandbox Code Playgroud)
现在它可以进入单元格但不读取任何文本。
有什么方法可以放置一些只能由屏幕阅读器访问且在用户界面上不可见的文本吗?
android ×3
bitmap ×1
exception ×1
flowchart ×1
font-awesome ×1
javascript ×1
mediastore ×1
raphael ×1
rendering ×1
sorting ×1
streaming ×1
svg ×1
textures ×1
video ×1