Reply:
gettext () method ah
Reply:
uitextview find this approach you?
Reply:
textview.text
Reply:
text is an attribute; getText is the default method to get this property. That is to follow the so-called getter / setter specification. Similarly, you can use for this property assignment method setText
Reply:
According naming cocoa, the name should be the name accessor methods instead of getName
Reply:
Is not text.getText (), but the error
Reply:
Give you an example! ! ! Oh
Research
android: layout_height = "fill_parent"
android: orientation = "vertical">
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: text = "@ string / hello" />
package com.ti;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class TtttActivity extends Activity {
/ ** Called when the activity is first created. * /
@ Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
TextView t = (TextView) findViewById (R.id.ttttt);
t.setText ("I am a textview");
System.out.print (t.getText ());
setContentView (R.layout.main);
}
}
so easy
No comments:
Post a Comment