Good Day,
I have a scenario where i have to use Java to set content of a edit text or a label. I have tried using the code below.
There is an error on line
this.tv_message = (TextView) findViewById(android.R.id.ed_tv1);
this.tv_message.setText("hello");
I have a scenario where i have to use Java to set content of a edit text or a label. I have tried using the code below.
There is an error on line
this.tv_message = (TextView) findViewById(android.R.id.ed_tv1);
this.tv_message.setText("hello");
javacode:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private ed_tv1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
#If JAVA
import android.view.*;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
private TextView tv_message;
public void Test() {
setProgressBarIndeterminateVisibility(true);
}
public void _onCreate() {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
}
public void _onResume() {
processBA.Log("OnResume");
this.tv_message = (TextView) findViewById(android.R.id.ed_tv1);
this.tv_message.setText("hello");
}
public void _onPause() {
processBA.Log("onPause");
}
public void _onDestroy() {
processBA.Log("_onDestroy");
}
public void _onStop() {
processBA.Log("_onStop");
}
public void _onStart() {
processBA.Log("_onStart");
}
public void _onPrepareOptionsMenu (Menu menu) {
processBA.Log("_onPrepareOptionsMenu");
}
public boolean _onCreateOptionsMenu (Menu menu) {
processBA.Log("_onCreateOptionsMenu");
return false;
}
#End IF