我想为我的应用程序签署配置文件,我从服务器下载然后将其安装到我的设备上,这对于iOS 7.0,7.1,...,8.2版本非常有效,并且对于安装配置文件,它显示"已验证"状态.但对于iOS v.8.3及更高版本,安装配置文件时显示状态为"未验证".我使用来自https://www.apple.com/certificateauthority/的证书来获取ROOT我正在使用证书名称Apple Inc.根证书和中间证书我正在使用Apple IST CA 2 - G1 Certficate.任何帮助将不胜感激.谢谢.
嗨我是android的新手:
我在GridView中显示图像拇指.为了获得更好的性能,我将异步加载它.
我的AsyncTask如下:
class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> {
private final WeakReference<ImageView> imageViewReference;
private int data = 0;
private String image_path;
public BitmapWorkerTask(ImageView imageView) {
imageViewReference = new WeakReference<ImageView>(imageView);
}
@Override
protected Bitmap doInBackground(Integer... params) {
data = params[0];
Bitmap picture = BitmapFactory.decodeFile(image_path);
int width = picture.getWidth();
int height = picture.getHeight();
float aspectRatio = (float) width / (float) height;
int newWidth = 98;
int newHeight = (int) (98 / aspectRatio);
return picture = Bitmap.createScaledBitmap(picture, newWidth,
newHeight, true);
}
@Override …Run Code Online (Sandbox Code Playgroud) Android 2.3.3
我有一个约5 RadioButton秒钟RadioGroup.我不希望方向是垂直的,因为它占用了大部分可用空间.如果我将方向保持为水平,则只能看到2或3,其余的将消失,因为屏幕尺寸不适合所有水平方向.
我可以使用水平布局跨越这些单选按钮超过1行.
我一直在阅读关于Stckoverflow的许多问题和答案.但还是找不到我实际使用的时间adapter.notifyDataSetChanged.
以前,在将所有项目添加到ArrayList之后,我做到了
adapter = new ListViewAdapter(MainActivity.this, menuItems);
lv.setAdapter(adapter);
adapter.notifyDataSetChanged();
它在我的手机上没有崩溃,模拟器和只有少数人发生了这次崩溃.
然后,我做到了.
adapter = new ListViewAdapter(MainActivity.this, menuItems);
adapter.notifyDataSetChanged();
lv.setAdapter(adapter);
与上述结果相同.
但我讨厌崩溃.我讨厌下载我的应用程序的人有FC.然后我尝试了这个,知道可能适配器必须刷新,然后我可以设置一个新的.
adapter.notifyDataSetChanged();
adapter = new ListViewAdapter(MainActivity.this, menuItems);
lv.setAdapter(adapter);
结果是在向下滚动几页[永不停止的列表视图]之后,它在我的手机上崩溃了.
也许是我不懂的.但是我们什么时候才开始使用adapter.notifyDataSetChanged?
如果它有帮助,这是我的完整代码.
`
private class firstLoad extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
setSupportProgressBarIndeterminateVisibility(true);
if (lv.getVisibility() == View.VISIBLE) {
lv.setVisibility(View.GONE);
}
}
protected Void doInBackground(Void... unused) {
try {
xml = parser.getXmlFromUrl(getURLFromXML + "main.php");
doc = parser.getDomElement(xml);
NodeList nl = doc.getElementsByTagName(Consts.KEY_ITEM);
for (int i = …Run Code Online (Sandbox Code Playgroud) 我刚刚根据这个例子http://www.londatiga.net/featured-articles/how-to-select-and-crop-image-on-android/在我的应用程序中实现了一个图像裁剪活动.
我想要实现的是一个裁剪为正方形的图像,其尺寸为原始图像的较小尺寸,例如400 x 600的图像会导致裁剪图像400 x 400.不幸的是,确定裁剪图像的矩形无论我设置的输入,大小都不会填充图像并保持不变Intent("com.android.camera.action.CROP").
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setType("image/*");
intent.setData(mImageCaptureUri);
intent.putExtra("outputX", widthHeight);
intent.putExtra("outputY", widthHeight);
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("noFaceDetection", true);
intent.putExtra("return-data", true);
Run Code Online (Sandbox Code Playgroud)

我这是由于我使用的android模拟器或我怎么能改变它?
第二个问题:任何人都可以告诉我是否可以以某种方式设置此Intent的样式?
非常感谢!!
我正在做android视频摄像头应用程序.它应该具有使用后置和前置摄像头进行录制的功能.我完成了后置摄像头,一切都很好.但是当我用前置摄像头录制时,视频会颠倒过来.我必须播放我的应用程序本身录制的视频.我正在使用VideoView,如何设置方向或使其正确播放?在默认媒体播放器中播放的视频也在颠倒播放.尝试将视频发送到iPhone并进行检查,但仍然会颠倒.我有setOrientationHint到MediaRecorder但没有解决方案.
所有我的代码类似于agargenta的视频捕获演示,我已经完成了自定义.
问题似乎很奇怪,我很震惊.
this.mediaRecorder = new MediaRecorder();
this.mediaRecorder.setCamera(this.mCamera);
this.mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
this.mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
if (Build.VERSION.SDK_INT <= 10) {
CamcorderProfile camcorderProfile = CamcorderProfile
.get(CamcorderProfile.QUALITY_HIGH);
camcorderProfile.videoFrameWidth = 320;
camcorderProfile.videoFrameHeight = 480;
// camcorderProfile.videoFrameRate = 15;
camcorderProfile.videoCodec = MediaRecorder.VideoEncoder.H264;
// camcorderProfile.audioCodec = MediaRecorder.AudioEncoder.DEFAULT;
camcorderProfile.fileFormat = MediaRecorder.OutputFormat.MPEG_4;
this.mediaRecorder.setProfile(camcorderProfile);
mediaRecorder.setOrientationHint(90);
} else {
if (tgbSwitchCamera.isChecked()) {
mediaRecorder
.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
// mediaRecorder.setVideoSize(320, 480);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
CameraInfo cameraInfo = new CameraInfo();
Camera.getCameraInfo(CameraInfo.CAMERA_FACING_FRONT, cameraInfo);
rotation = (cameraInfo.orientation - 180 + 360) % 360;
mediaRecorder.setOrientationHint(rotation);
} else {
CamcorderProfile camcorderProfile = …Run Code Online (Sandbox Code Playgroud) android android-camera android-orientation android-videoview
如何设置手机和平板电脑中textview的字体大小.我所指的帖子建议创建dimen.xml,并把它们分别是不同的文件夹values-mdpi,values-hdpi,values-ldpi.平板电脑(1024x600)分辨率从values-mdpi文件夹中选取,因此手机(320x480)也从values-mdpi文件夹中选取,这使得手机上的字体看起来非常大且扭曲,而平板电脑上看起来很好.
有没有办法分别指定手机和平板电脑的字体大小.