我正在尝试将文字视图叠加在图像视图上.像这样的东西

有人可以帮我解决这些问题.
我想检测前置摄像头框架中的面部数量.一旦我使用此图像获取图像,我就可以检测到脸部:http://www.developer.com/ws/android/programming/face-detection-with-android-apis.html.但我不知道如何在没有用户互动的情况下每隔30秒使用前置摄像头捕获图像.有人可以帮助我吗?
我正在使用这个类在地图上显示路线.问题是它只显示一条路线.我想要做的是在地图上显示多个备用路线.即使服务器响应有多条路由,它也只解析第一条路由并显示它.我应该做些什么更改才能显示google服务器返回的所有路由.这是我的课程.
public class GMapV2Direction {
public final static String MODE_DRIVING = "driving";
public final static String MODE = "walking";
public final static String MODE_WALKING = "walking";
public GMapV2Direction() { }
public Document getDocument(LatLng start, LatLng end, String mode) {
String url = "http://maps.googleapis.com/maps/api/directions/xml?"
+ "origin=" + start.latitude + "," + start.longitude
+ "&destination=" + end.latitude + "," + end.longitude
+ "&sensor=false&units=metric&mode="+MODE+"alternatives=true";
try {
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpPost httpPost = new HttpPost(url);
HttpResponse response …Run Code Online (Sandbox Code Playgroud) 我希望能够从我的应用程序传输我的文件块而不是完整的文件,以便更有效地传输它.最好的方法是什么?
更新
这是一个我需要这种方法的例子:假设我有一个4GB文件,我试图上传.如果网络出现故障,我的文件上传将停止,我将不得不从头开始.相反,如果我跟踪已经传输的块,我可以从尚未传输的块继续.这对于片状网络连接尤其重要.
我试图在android中创建一个自定义扩展工具栏,工具栏中有一个编辑文本.我想要实现的布局看起来像这样

我编写实现的代码是这样的:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/my_awesome_toolbar"
android:layout_height="256dp"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/searchbox"
android:layout_alignParentBottom="true"
android:text="Test"
android:background="#ffffff"
/>
</android.support.v7.widget.Toolbar>
Run Code Online (Sandbox Code Playgroud)
并且Activity具有以下代码
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
if (toolbar != null) {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
}}
Run Code Online (Sandbox Code Playgroud)
但我得到的是这样的:

没有很多关于自定义扩展工具栏的教程,所以非常感谢一些帮助.
例:
n = 9
words = {Bike, Tire, Fuel, Biker, Filter, Trike}
output = {B,T,I,K,E,F,U,L,R}
(输出顺序并不重要.需要注意的是,给定像FOO这样的单词,不能使用F,O作为字母表,但总是需要F,O,O.类似的字母表分别处理)
解决这个问题最有效的算法是什么?
我正在考虑使用每个角色的频率,但这似乎没有多大帮助.
例如,此哈希函数应为这两个字符串返回相同的哈希值。
字符串a =“ hello”字符串b =“ olleh”
其背后的动机是在句子中找到重复的单词对。
android ×5
algorithm ×2
string ×2
camera ×1
directions ×1
google-maps ×1
graph ×1
hash ×1
imageview ×1
performance ×1
textview ×1