コード例 #1
0
  public void speakOutExpression() {
    String expression = new String();
    for (ImageObject io : ExpressionAdapter.dataObjects) {
      if (ImageGridActivity.isMale == 1)
        if (io.getTts_m() != null && !io.getTts_m().isEmpty()) expression += io.getTts_m();
        else expression += io.getDescription();
      else if (io.getTts_f() != null && !io.getTts_f().isEmpty()) expression += io.getTts_f();
      else expression += io.getDescription();

      if (!expression.isEmpty()) expression += " ";
    }

    executing_actv.speakOut(expression);
    ExpressionAdapter.incrUseCounter();
  }
コード例 #2
0
  @Override
  public void onItemClick(AdapterView<?> arg0, View arg1, int position, long id) {
    /*		if(doubleBackToExitPressedOnce){
    			ExpressionAdapter.dataObjects.remove(position);
    			mAdapter.notifyDataSetChanged();
    			doubleBackToExitPressedOnce = false;
    			return;
    		}

    		doubleBackToExitPressedOnce = true;
    */
    ImageObject iobj = ExpressionAdapter.dataObjects.get(position);
    if (!TextUtils.isEmpty(iobj.getDescription())) executing_actv.speakOut(iobj.getDescription());

    /*		new Handler().postDelayed(new Runnable(){
    			@Override
    			public void run() {
    				doubleBackToExitPressedOnce =false;
    			}
    		},2000);

    */
  }