1 25 6 47 4813 14 18 19 25 26 38 39 45 46 55 56 59 60 65 66 67 68
java
1 package com.example.alimjan.hello_world; 2 3 import android.app.Activity; 4 import android.content.Context; 5 import android.content.Intent; 6 import android.os.Bundle; 7 import android.support.annotation.Nullable; 8 import android.view.View; 9 import android.widget.Button;10 11 /**12 * Created by alimjan on 6/30/2017.13 */14 15 public class class__2_3_1 extends Activity {16 private Button lts;17 @Override18 protected void onCreate(@Nullable Bundle savedInstanceState) {19 super.onCreate(savedInstanceState);20 setContentView(R.layout.code_2_3_1);21 22 lts = (Button) findViewById(R.id.btn_liaotianshi);23 24 lts.setOnClickListener(new View.OnClickListener() {25 @Override26 public void onClick(View v) {27 Intent intent = new Intent(class__2_3_1.this, class__2_3_1_2.class);28 class__2_3_1.this.startActivity(intent);29 }30 });31 32 }33 34 public static void startHome(Context mContext) {35 Intent intent = new Intent(mContext, class__2_3_1.class);36 mContext.startActivity(intent);37 }38 }