小编gan*_*esh的帖子

为MediaStore.ACTION_VIDEO_CAPTURE设置最长持续时间的稳定方法

我从这里发布的几篇文章中了解到,用于捕获视频的MediaStore.EXTRA_DURATION_LIMIT只能从版本2.2开始工作,但我使用的是2.3.3版本的三星Galaxy S II.以下代码似乎对最长持续时间没有影响.

Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 2000);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
intent.putExtra(MediaStore.EXTRA_FINISH_ON_COMPLETION,true);
startActivityForResult(intent, REQUEST_TAKE_VIDEO);
Run Code Online (Sandbox Code Playgroud)

如果它的设备是特定的,那么这个问题是否存在解决方法.

android video-capture android-intent

5
推荐指数
1
解决办法
2047
查看次数

从Android应用程序调用Google Map应用程序以获得指导方向


我需要使用外部谷歌地图应用程序显示行车方向我发现此链接 http://developer.android.com/guide/appendix/g-app-intents.html,但下面打开地图应用程序到指定位置

    Uri uri = Uri.parse("geo:13.070984,80.253639");
    Intent in = new Intent(Intent.ACTION_VIEW, uri);
    startActivity(in);
Run Code Online (Sandbox Code Playgroud)

我需要知道有没有办法通过两个地理位置来获得行车方向.

android google-maps android-intent

4
推荐指数
1
解决办法
9236
查看次数

Android布局上的简单转换动画第二次不起作用


我的xml文件如下

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="100" >

<!-- top -->

  <LinearLayout
    android:id="@+id/top_container"
    android:layout_width="fill_parent"
    android:layout_height="0dip"
    android:layout_weight="60"
    android:background="@drawable/xxx" >

  </LinearLayout>

<!-- bottom -->

  <TableLayout
    android:id="@+id/bottom_container"
    android:layout_width="fill_parent"
    android:layout_height="0dip"
    android:layout_weight="40"
    android:background="@drawable/yyy"
    android:padding="20dip"
    android:stretchColumns="1"
    android:weightSum="2" >

    <TableRow>

     </TableRow>
   </TableLayout>
 </LinearLayout>
Run Code Online (Sandbox Code Playgroud)

动画文件trans_from_bottom.xml

 <translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:duration="1000"
    android:fromYDelta="100%"
    android:toYDelta="0%" />
Run Code Online (Sandbox Code Playgroud)

动画文件trans_from_top.xml

<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:duration="1000"
    android:fromYDelta="-100%"
    android:toYDelta="0%" />
Run Code Online (Sandbox Code Playgroud)

trans_back_to_top.xml

<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:duration="1000"
    android:fillAfter="true"
    android:fromYDelta="0%"
    android:toYDelta="-100%" />
Run Code Online (Sandbox Code Playgroud)

trans_back_to_bottom.xml

 <translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:duration="1000"
    android:fillAfter="true"
    android:fromYDelta="0%"
    android:toYDelta="100%" />
Run Code Online (Sandbox Code Playgroud)

简单的类如下面的代码行

    topCont =(LinearLayout)findViewById(R.id.top_container);
    botCont =(TableLayout)findViewById(R.id.bottom_container);

    Animation   slidedown …
Run Code Online (Sandbox Code Playgroud)

android android-animation android-layout

4
推荐指数
1
解决办法
2787
查看次数

如何避免android webview的缩放

有没有办法阻止Android webview缩放渲染的网页.
我需要加载一个链接到其他页面的URL.当用户单击这些链接时,渲染的页面没有正确对齐(我的意思是它在屏幕宽度和高度内扼杀所有内容)与默认处理相同的网页相比android浏览器.

当我评论shouldOverrideUrlLoading时,对齐是正确的,但我需要在我的应用程序中重定向,所以我无法避免覆盖shouldOverrideUrlLoading.Is还有其他选项遗漏.

android webview

第一个图像显示了我的应用程序中的webview呈现页面,因为我覆盖了shouldOverrideUrlLoading,第二个图像在评论了shouldOverrideUrlLoading后显示了相同的屏幕.

android webview

1
推荐指数
1
解决办法
5195
查看次数