Ek Kahani Hai Jo Sabko Sunani Hai (Yalgaar Ho) - Carryminati, Wily Frenzy | Lyrics | Mp3 Download

Title Name  - Yalgaar Singer Name - Ajey Nagar Lyric - Ajey Nagar Print Lyrics To Kese Hai Aap Log Ek Kahani Hai Jo Sa...

Open Browser After Clicking Button - Android Studio

Button Click Function -

>> first you make a button on XML file or layout Design.
>> then Go to Activity Class and Define Button Property and Function.

public class MainActivity extends AppCompatActivity {
    private Button bt1;

    protected void onCreate(Bundle savedInstanceState) {

        bt1 = findViewById(R.id.button1);

        bt1.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("enter your url"));

>> Yellow Highlighted Code is Show How to Open External link in browser, when Clicking a Button.

No comments:

Post a comment