es soll immo beim touch oder beim loslassen einfach nur in ein textfield was geschrieben werden. jedoch funzt das nicht. hier mal mein code:
es gibt keinen fehler. woher sehe ich nun, was da falsch ist? irgendwas muss ja falsch sein ???:L
Java:
package bla;
import android.os.Bundle;
...
public class MainActivity extends Activity implements OnTouchListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tabs);
TabHost th = (TabHost) findViewById(R.id.tabhost);
th.setup();
TabSpec specs;
specs = th.newTabSpec("tag1");
specs.setContent(R.id.tab1);
specs.setIndicator("bla");
th.addTab(specs);
specs = th.newTabSpec("tag_2");
specs.setContent(R.id.tab2);
specs.setIndicator("blub");
th.addTab(specs);
specs = th.newTabSpec("tag_3");
specs.setContent(R.id.tab3);
specs.setIndicator("blör");
th.addTab(specs);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
///////////////////////////////////////////////////
@Override
public boolean onTouch(View v, MotionEvent event) {
EditText et126 = (EditText) findViewById(R.id.EditText126);
//et126.setTextColor(Color.GREEN);
{
int aktion = event.getAction();
if (aktion == MotionEvent.ACTION_DOWN)
{
String a = "11";
et126.setText(a);
return true;
}
if (aktion == MotionEvent.ACTION_MOVE)
{
String a = "22";
et126.setText(a);
return true;
}
if (aktion == MotionEvent.ACTION_UP)
{
String a = "33";
et126.setText(a);
return true;
}
return false;
}
}
}
es gibt keinen fehler. woher sehe ich nun, was da falsch ist? irgendwas muss ja falsch sein ???:L