小编Rao*_*o's的帖子

如何在微调器中更改下拉高度

我尝试了很多来改变微调器的下拉项目高度..但我无法得到一个很好的解决方案.. PLZ帮助我们..

这是一个代码loginactivityview.xml

       <Spinner
         android:id="@+id/spinnerFacility"
         android:layout_width="400dip"
         android:layout_height="50dip"
         android:layout_alignLeft="@+id/lpassword"
         android:layout_below="@+id/lpassword"
         android:layout_marginTop="32dip"            
         android:background="@drawable/location" 
         android:paddingLeft="10dip"               
         android:dropDownWidth="@style/dropDown"  
         android:minHeight="40dip"     
         android:typeface="monospace" />
Run Code Online (Sandbox Code Playgroud)

loginrowspinner.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" >

  <TextView
    android:id="@+id/textViewRowFacility"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="left"
    android:paddingBottom="5dip"
    android:paddingLeft="6dip"
    android:paddingRight="6dip"
    android:paddingTop="5dip"
    android:text="Facility"
    android:textColor="#000000"
    android:textSize="20dip" >
</TextView>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

如何改变任何想法下降的高度..

android android-intent android-layout android-spinner

15
推荐指数
4
解决办法
5万
查看次数

具有快速滚动和字母部分索引的Android ListView

如何在图像中显示右侧字母面板上的字母时添加testview?请你帮助我好吗?以下是我的代码.

详细地说,我正在寻找一个与下图完全相同的例子.目前我做了数据分类.当我点击右侧字母面板时,它会正确显示数据.但问题是当触摸一个字母右边的字母面板我需要显示他按图像(E)中显示的大尺寸字母.我怎么能这样做,你能帮我吗?先感谢您!

所需UI的屏幕截图

// MainActivity.java
public class MainActivity extends Activity implements
                          SearchView.OnQueryTextListener,
                          SearchView.OnCloseListener {

    private IndexableListView listView;
    private SearchView search;
    EfficientAdapter objectAdapter;
    EfficientAdapter2 objectAdapter1;
    int textlength = 0;
    private CheckBox checkStat, checkRoutine, checkTat;
    private ArrayList<Patient> patientListArray;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.homempleb);
        Log.i("scan"," txtScanResult ");

        ActionItem nextItem = new ActionItem();
        final QuickAction quickAction = new QuickAction(this, QuickAction.VERTICAL);
        quickAction.addActionItem(nextItem);
        quickAction.setOnDismissListener(new QuickAction.OnDismissListener() {
            @Override
            public void onDismiss() {
                Toast.makeText(getApplicationContext(), "Dismissed", Toast.LENGTH_SHORT).show();
            }
        });

        listView = (IndexableListView) findViewById(R.id.homelistView);
        listView.setTextFilterEnabled(true);
        listView.setFastScrollEnabled(true);
        listView.setFastScrollAlwaysVisible(true);
        objectAdapter …
Run Code Online (Sandbox Code Playgroud)

android android-widget android-emulator android-intent android-layout

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

错误ERROR_RECOGNIZER_BUSY具有离线语音识别功能

我对谷歌离线语音识别进行了研究.但它在谷歌nexus 5(操作系统:-4.4)工作正常,但如果我在三星galaxy s5(操作系统:-5.0)实现相同的构建,它无法识别,它显示此错误:

8- ERROR_RECOGNIZER_BUSY.

以下是我的代码.通过保持此链接作为参考,我做了一些更改http://www.truiton.com/2014/06/android-speech-recognition-without-dialog-custom-activity/

没有互联网语音必须承认.我曾经在Pocket sphinx上工作,但它需要大量的侧面声音,因此客户拒绝了它.

public class VoiceRecognitionActivity extends Activity implements RecognitionListener {

    private TextView returnedText;
    private static ProgressBar progressBar;
    private static SpeechRecognizer speech = null;
    private static Intent recognizerIntent;
    private String LOG_TAG = "VoiceRecognitionActivity";
    private Button button1;
    Activity activity = VoiceRecognitionActivity.this;
    private TextView textView2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        returnedText = (TextView) findViewById(R.id.textView1);
        textView2 = (TextView) findViewById(R.id.textView2);
        progressBar = (ProgressBar) findViewById(R.id.progressBar1);
        button1 = (Button) findViewById(R.id.button1);

         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    //  toggleButton = (ToggleButton) findViewById(R.id.toggleButton1);

         PackageManager …
Run Code Online (Sandbox Code Playgroud)

android speech-recognition speech-to-text android-intent google-voice-search

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

Android原生的vimeo视频播放

我正在开发本机android中的vimeo视频应用程序.但它不受支持VideoView.我可以知道Android的任何示例或相关查询.我希望最终输出为.mp3/.mp4格式.

iframe在Android中尝试过WebView,它在Android中运行良好,WebView但我无法获得搜索栏.并且OnPause()无法暂停视频.在这里,我只能获得暂停和播放按钮

在此输入图像描述

示例:player.vimeo.com/video/49462103

我想在Android原生播放这个视频

 <VideoView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/videoView"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true" />
Run Code Online (Sandbox Code Playgroud)

更新链接: Vimeo站点Thread-1 Vimeo站点Thread-2

在此输入图像描述

我超过了错误

android vimeo vimeo-player android-videoview vimeo-android

8
推荐指数
2
解决办法
1万
查看次数

如何在baseAdapter中使用onclick按钮

如何使用扩展baseadapter中的click事件按钮..我尝试了很多但没有用..在我的项目中有自定义列表视图,它包含文本,按钮(btnlist),快速滚动索引.当我onclick按钮(btnlist)它不是gng到其他活动,没有错误也显示,没有吐司..
Plz帮我举例.提前谢谢你.

快速参考:getview ---> holder.btnList.setOnClickListener

EfficientAdapter.java

public class EfficientAdapter extends BaseAdapter implements SectionIndexer, OnClickListener {
IndexableListView mListView;
private String mSections = "#ABCDEFGHIJKLMNOPQRSTUVWXYZ";
ArrayList<Patient> patientListArray;

private Intent intent;
private Patient patient;
private LayoutInflater mInflater;
private Context context;
private int positions;
ViewHolder holder;


public EfficientAdapter(Context context) {
    mInflater = LayoutInflater.from(context);
    this.context = context;

    String patientListJson = CountriesList.jsonData;
    JSONObject jssson;
    try {
        jssson = new JSONObject(patientListJson);
        patientListJson = jssson.getString("PostPatientDetailResult");
    } catch (JSONException e) {
        e.printStackTrace();
    }
    Gson gson = new Gson();
    JsonParser parser …
Run Code Online (Sandbox Code Playgroud)

android onclick android-emulator android-intent android-layout

7
推荐指数
1
解决办法
2万
查看次数

离线语音识别android采取不必要的声音

我已经为研究做了很多工作并尝试了离线口袋狮身人面像,但它正在采取周围的声音,并以不同的方式对我的应用做出反应.以上kitkat 4.4是否有谷歌离线应用程序..我正在尝试从2周.谢谢你的宝贵答案.

详细信息:当活动开始时,文本必须在完成后阅读内容(文本到语音),阅读语音识别必须采取语音并按照命令ex :(下一个,上一个,前进,选项,1,2,3, 4等).根据命令,它必须在onresult方法中识别并作出反应.

错误:我收到一些声音后收到错误

06-18 19:54:00.159: V/onBeginningOfSpeech(3360): onBeginningOfSpeech
06-18 19:54:01.024: V/onPartialResult(3360): option
06-18 19:54:01.109: I/cmusphinx(3360): INFO: fsg_search.c(843): 105 frames, 5333 HMMs (50/fr), 7748 senones (73/fr), 371 history entries (3/fr)
06-18 19:54:01.110: I/SpeechRecognizer(3360): Stop recognition
06-18 19:54:01.110: E/cmusphinx(3360): ERROR: "fsg_search.c", line 913: Final result does not match the grammar in frame 105
06-18 19:54:01.111: V/onPartialResult-->(3360): option
06-18 19:54:01.111: V/onResult(3360): onResult
Run Code Online (Sandbox Code Playgroud)

Android Hive离线链接

但如果我关闭互联网,它就不能脱机工作了.

在pocketsphinx中,它没有对正确的词作出反应.如果我说"下一个"它接近另一个的声音内容附加"密钥",它给了我很多问题.是否有任何离线使用的解决方案或库.任何离线谷歌离线语音支持.

以下是我的代码尝试

package com.example.sample1;

import static edu.cmu.pocketsphinx.SpeechRecognizerSetup.defaultSetup;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import …
Run Code Online (Sandbox Code Playgroud)

android speech-recognition speech-to-text voice-recognition pocketsphinx-android

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

如何在android中启用或禁用复选框

我的quickalert对话框中有4个复选框...我想要的是,当我选中[启用] 1复选框时,其他3复选框必须得到禁用..我点击它们,但没有禁用.我不知道该怎么做.

这是我正在寻找的:

小样

    checkmrn  =  (CheckBox) container.findViewById(R.id.MrnCheckBox);
    checkmrn.setText("By Mrn");
    checkmrn.setEnabled(false);
    checkdate  =  (CheckBox) container.findViewById(R.id.dateCheckBox);
    checkdate.setText("By Date");
    checkname  =  (CheckBox) container.findViewById(R.id.nameCheckBox);
    checkname.setText("By Name");
    checklocation  =  (CheckBox) container.findViewById(R.id.locationCheckBox);
    checklocation.setText("By Location");
    okButton = (Button) container.findViewById(R.id.okButton);
    okButton.setText("Ok");

    checkmrn.setOnClickListener(new OnClickListener() {          
          @Override
          public void onClick(View v) {                  
            if (((CheckBox) v).isChecked()) {
                Toast.makeText(mContext, "By Mrn", Toast.LENGTH_SHORT).show();
            }        
          }
        });
    checkdate.setOnClickListener(new OnClickListener() {             
          @Override
          public void onClick(View v) {                  
            if (((CheckBox) v).isChecked()) {
                Toast.makeText(mContext, "By Date", Toast.LENGTH_SHORT).show();
            }        
          }
        });
    checkname.setOnClickListener(new OnClickListener() {             
          @Override
          public void onClick(View …
Run Code Online (Sandbox Code Playgroud)

checkbox android android-layout

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

如何在android中进行计划/业务日历

我计划在日期之下制作包含动态事件的日历.但我没有得到关于它的好样本.什么是精确的名称调用如下图所示在android或分享一些想法.我有很多apk和相关的图像.但它背后没有确切的想法,android是否支持它.我计划在月,周,日显示日历.在谷歌搜索很多我写这个.它是否支持从2.3到4的所有版本.我在上面的verison 4上看到了一些博客业务日历支持.非常感谢善良和好主意.

在此输入图像描述

android calendar android-intent android-layout android-listview

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