Sobre teclado Android

Ola Pessoal estou fazendo uma aplicação para android onde eu verifico umas comandas para ver se estar aberta ou fechada o projeto, inicial me diz que eu tenho que desenhar um teclado(que ainda nao sei como fazer) porem pelo que percebi tenho que desatibilitar o teclado inicial do aplicativo como devo fazer isto

  1. desabilitar teclado do aplicatico
  2. desenhar este teclado e colocar para funcionar( alguem tem exemplo de como posso fazer isto)

descupa é aplicacao para android

Obrigado

Joao

Pelo que eu entendi, vc quer fazer seu próprio teclado, e colocá-lo pra funcionar, correto??
Se for isso, vc pode ‘brincar’ com o LinearLayout, e colocar uns botões nele… Dá um pouco de trabalho, mas vale a pena… eu fiz um teclado numérico aqui que ficou bem bacana!

ola elizangela boa tarde vc tem exemplo de onde vc pegou como estou comecando agora fico meio perdido ainda

Obrigado

Joao

Na verdade não tenho nenhum exemplo… Ainda não achei nenhum local que exemplificasse a criação de um teclado personalizado.

Eu não consigo te passar as classes que tenho aqui como exemplo, porque tenho muitas classes aqui. Acho que ainda hj consigo bolar um exemplo pra te passar.

ok fico no agurado

Olá, João!

Desculpe a demora, mas estou aqui, finalmente!
Segue um pequeno exemplo de como vc pode implementar um tecladinho:

O seguredo está em controlar em qual campo que está o foco.

[code]package teste.teste;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import java.util.ArrayList;
import java.util.List;

/**
*

  • @author eliangela
    */
    public class TecladoNumerico {

    private LinearLayout principalLayout;
    private StringBuilder texto = new StringBuilder();
    private EditText ondeEscrever;
    private List<EditText> ondeEscreverList = new ArrayList<EditText>();
    private int focoAtual = 0;
    //
    private Context context;
    private LinearLayout tecladoLayout;
    private LinearLayout numerosLayout;
    private float textSize = 30;
    //layout dos numeros
    private LinearLayout row1; //1,2,3
    private LinearLayout row2; //4,5,6
    private LinearLayout row3; //7,8,9
    //
    private LinearLayout.LayoutParams rowNumLayoutParams;
    private LinearLayout.LayoutParams funcLayoutParams;

    public TecladoNumerico(Context context) {
    this.principalLayout = new LinearLayout(context);
    this.context = context;

     init();
     buildNumerico();
    

    }

    private void init() {
    tecladoLayout = new LinearLayout(context);
    numerosLayout = new LinearLayout(context);

     principalLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
    
     funcLayoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
     funcLayoutParams.gravity = Gravity.CENTER;
     funcLayoutParams.weight = 0.5F;
    

    }

    private void buildNumerico() {
    principalLayout.setOrientation(LinearLayout.VERTICAL);
    numerosLayout.setOrientation(LinearLayout.VERTICAL);
    tecladoLayout.setOrientation(LinearLayout.HORIZONTAL);

     rowNumLayoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
     rowNumLayoutParams.gravity = Gravity.CENTER;
     rowNumLayoutParams.weight = 0.5F;
    
     row1 = new LinearLayout(context);
     row1.setOrientation(LinearLayout.HORIZONTAL);
    
     Button n1Button = new Button(context);
     Button n2Button = new Button(context);
     Button n3Button = new Button(context);
     Button n4Button = new Button(context);
     Button n5Button = new Button(context);
     Button n6Button = new Button(context);
     Button n7Button = new Button(context);
     Button n8Button = new Button(context);
     Button n9Button = new Button(context);
    
     n1Button.setTextSize(textSize);
     n1Button.setText(&quot;1&quot;);
     n2Button.setTextSize(textSize);
     n2Button.setText(&quot;2&quot;);
     n3Button.setTextSize(textSize);
     n3Button.setText(&quot;3&quot;);
     n4Button.setTextSize(textSize);
     n4Button.setText(&quot;4&quot;);
     n5Button.setTextSize(textSize);
     n5Button.setText(&quot;5&quot;);
     n6Button.setTextSize(textSize);
     n6Button.setText(&quot;6&quot;);
     n7Button.setTextSize(textSize);
     n7Button.setText(&quot;7&quot;);
     n8Button.setTextSize(textSize);
     n8Button.setText(&quot;8&quot;);
     n9Button.setTextSize(textSize);
     n9Button.setText(&quot;9&quot;);
    
     row1.addView(n1Button, rowNumLayoutParams);
     row1.addView(n2Button, rowNumLayoutParams);
     row1.addView(n3Button, rowNumLayoutParams);
    
     row2 = new LinearLayout(context);
     row2.setOrientation(LinearLayout.HORIZONTAL);
     row2.addView(n4Button, rowNumLayoutParams);
     row2.addView(n5Button, rowNumLayoutParams);
     row2.addView(n6Button, rowNumLayoutParams);
    
     row3 = new LinearLayout(context);
     row3.setOrientation(LinearLayout.HORIZONTAL);
     row3.addView(n7Button, rowNumLayoutParams);
     row3.addView(n8Button, rowNumLayoutParams);
     row3.addView(n9Button, rowNumLayoutParams);
    
     numerosLayout.addView(row1);
     numerosLayout.addView(row2);
     numerosLayout.addView(row3);
    
     LinearLayout.LayoutParams numLayoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
     numLayoutParams.gravity = Gravity.CENTER;
     numLayoutParams.weight = 0.3F;
     tecladoLayout.addView(numerosLayout, numLayoutParams);
    
     principalLayout.addView(tecladoLayout);
    

    }

    public void setTextSize(float size) {
    this.textSize = size;
    }

    private void setOndeEscrever(EditText ondeEscrever) {
    this.ondeEscrever = ondeEscrever;
    if (ondeEscrever == null) {
    this.texto = new StringBuilder();
    return;
    }
    this.texto = new StringBuilder(this.ondeEscrever.getText());
    this.ondeEscrever.requestFocus();
    }

    protected boolean isEmpty() {
    return texto.length() == 0;
    }

    protected void insertString(String texto) {
    if (ondeEscrever == null) {
    return;
    }

     String txt = ondeEscrever.getText().toString();
     if (!this.texto.toString().equals(txt)) {
     	this.texto = new StringBuilder(txt);
     }
    
     this.texto.append(texto);
     ondeEscrever.setText(this.texto.toString());
    

    }

    public synchronized void backspace() {
    if (ondeEscrever == null) {
    return;
    }

     String txt = ondeEscrever.getText().toString();
     if (!texto.toString().equals(txt)) {
     	texto = new StringBuilder(txt);
     }
    
     if (isEmpty()) {
     	return;
     }
    
     texto.deleteCharAt(texto.length() - 1);
     ondeEscrever.setText(texto.toString());
    

    }

    public boolean isLastFocus() {
    return focoAtual == ondeEscreverList.size() - 1;
    }

    public boolean isFirstFocus() {
    return focoAtual == 0;
    }

    public void nextFocus() {
    if (++focoAtual >= ondeEscreverList.size()) {
    focoAtual = 0;
    }

     setOndeEscrever(this.ondeEscreverList.get(focoAtual));
    

    }

    public void prevFocus() {
    if (–focoAtual < 0) {
    focoAtual = this.ondeEscreverList.size() - 1;
    }

     setOndeEscrever(this.ondeEscreverList.get(focoAtual));
    

    }

    public void addOndeEscrever(EditText… edits) {
    for (EditText v : edits) {
    if (this.ondeEscreverList.contains(v)) {
    throw new IllegalArgumentException("O mesmo EditText não pode ser adicionado mais de uma vez");
    }

     	v.setInputType(0);
     	v.setOnFocusChangeListener(new View.OnFocusChangeListener() {
    
     		public void onFocusChange(View view, boolean isFocado) {
     			if (isFocado) {
     				setOndeEscrever((EditText) view);
     				focoAtual = ondeEscreverList.indexOf(view);
     			} else {
     				setOndeEscrever(null);
     			}
     		}
     	});
     	this.ondeEscreverList.add(v);
     }
    

    }

    public void setVisivel(boolean visivel) {
    principalLayout.setVisibility(visivel ? View.VISIBLE : View.INVISIBLE);
    }

    public boolean isVisivel() {
    return principalLayout.getVisibility() == View.VISIBLE;
    }

    public LinearLayout getTecladoAsLinearLayout() {
    return principalLayout;
    }
    }

[/code]

ola cara amigo obrigado pela dica como ainda sou meio novato estaseria uma classe no android certo

como chamar ela na aplicao principal

OBrigado

Joao

Ola Cara Amigo eu clieu uma classe como devo chamar ele se aguem tambem puder me ajudar
?

Da uma olhada em InputMethodManager