• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Set text hint problem

KarneeKarnay

Newbie
Dec 3, 2012
24
0
I'm fairly new to Android development and I've just been going through the android development tutorials for help, but I'm stuck on this.

[HIGH]protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
EditText editText = (EditText) findViewById(R.id.edit_message);

EditText.setHint(message);

setContentView(R.layout.activity_list);
}[/HIGH]

My app includes a search bar. In the first activity the user types into it what they are looking for. What I am currently trying to do is try to change the text hint to the message string. This string contains what the user typed in the previous search bar. Any ideas?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones