0
public void responsePost(Editable editable)
{
TableLayout chatbox = (TableLayout)findViewById(R.id.chatbox);
TableRow tr1 = new TableRow(this);
tr1.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
TextView textview = new TextView(this);
textview.setText(editable);
// textview.getTextColors(R.color.)
textview.setTextColor(Color.YELLOW);
tr1.addView(textview);
chatbox.addView(tr1, new TableLayout.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
textview.setGravity(Gravity.RIGHT);
}
どうすればいいですか?それだけではない?私はsetGravity(Gravity.RIGHT)を使用しましたが、うまくいきませんでした。TableLayout Android Javaは完全に正しく設定されていますか?
There is a picture of what it is doing.
[tablelayoutチュートリアル](http://developer.android.coまた、[relativeLayoutチュートリアル](http://developer.android.com/resources/tutorials/views/hello-relativelayout.html)もあります。 –
マーク、そこには2つのものが描画され、左側には1つ、右側にはもう1つあるので、Javaコードで必要です。 – user1239315
私はうまくいけば、[look](http://i40.tinypic.com/vvq4p.png)を取って答えてくれます。 –