HALLO, warum mein Text nicht auf der Unterseite kommt, obwohl ich tparams.addRule angegeben haben (RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); ist hier mein Code bitte helfen,Text kommt nicht am unteren Rand des Bildschirms
footScroll_relative = new RelativeLayout(this);
footScroll_scrollView = new ScrollView(this);
footScroll_horizontalScrollView = new HorizontalScrollView(this);
test_text = new TextView(this);
footScroll_relative.setLayoutParams(new LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.FILL_PARENT));
LayoutParams tParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
tParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
footScroll_horizontalScrollView.setLayoutParams(new LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.FILL_PARENT));
footScroll_scrollView.setLayoutParams(tParams);
test_text.setText("Ramesh ");
footScroll_horizontalScrollView.addView(test_text);
footScroll_scrollView.addView(footScroll_horizontalScrollView);
footScroll_relative.addView(footScroll_scrollView);
setContentView(footScroll_relative);
Ja, ich habe den Code geändert, bekomme aber immer noch nicht meine gewünschte Ausgabe lin = new LinearLayout (this); test_text = neuer TextView (this); LayoutParams tParams = neue LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); tParams.addRule (RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); lin.setLayoutParams (tParams); test_text.setLayoutParams (neues LinearLayout.LayoutParams (android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.FILL_PARENT)); test_text.setText ("Ramesh"); Bitte Hilfe? – ramsbh