0

How to make a simple menu program of Android?

tell the code of simple program of android application.

21st Apr 2017, 3:30 AM
Us Ma N Badshah
Us Ma N Badshah - avatar
1 Odpowiedź
0
I've created a simple Android app below that creates a view with a text box and when the activity is initialised, the text is changed dynamically via Java. src/main/Java/uk/co/hassie/simpleapp/MainActivity.java import uk.co.hassie.simpleapp.R; public class MainActivity extends AppCompatActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView textView = (TextView) findViewById(R.id.textView1); textView.setText("Activity initialised"); } src/main/res/layout/activity_home.xml <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/textView1 android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Static text" /> </RelativeLayout> I recommend that you read through the Android SDK documentation on Google's Developer Site. They provide really clear and detailed explanation with code examples. It's the same way I learnt Android development, so I would recommend it.
22nd Apr 2017, 10:35 AM
Hassie
Hassie - avatar