Android App Development for Beginners – 13 – Create an Interface with Java

Share it with your friends Like

Thanks! Share it with your friends!

Close

Visit my website at https://www.thenewboston.com/ for all of my videos and tutorials!
Have questions or looking for source code? Check out the forum at https://www.thenewboston.com/forum/category.php?id=10

My Profile – https://www.thenewboston.com/profile.php?user=2
Facebook – http://www.facebook.com/pages/TheNewBoston/464114846956315
Google+ – https://plus.google.com/+BuckyRoberts/posts
Twitter – http://twitter.com/#!/bucky_roberts
Donate – https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5K9RJVCAKWZKS

Comments

jj vetri says:

how to remove an parser error

arti kumari says:

Anyone know what is Devomobiron Secrets about? I hear lots of people make money from their first iphone & android apps creation without any programming experience at all with Devomobiron Secrets (google search it).

Akash Singh says:

Whenever I add the layout code it shows error and I'm not able to work on Android studio. Please help.

Kunal Ninawe says:

cannot edit the code in mainActivity.java
cannot type or delete.
cursor is not showing up.
Please help.

Roxana Pop says:

Why do I have content_main besides activity_main? I did not create it, it seems to be on default and it's where I can actually modify stuff :?

Vlad Kolesnyk says:

Listen to me who has a crush problem. Delete everything after setContentView (toolbar, floating action bar, etc).

GlennBen says:

It doesn't work for me, copied the source code, exactly still doesn't work. Just closes immediately and says "unfortunately Allison stopped working"

Ayz Ali says:

0:48 how to secretly tell someone you have a crush, just right in the android development tutorial :D

Masum. Ahmed says:

It's still surprise me just how lots of people have no clue about Devomobiron Secrets (look on google search engine) despite the fact that lots of people make money from their first iphone & android apps creation without any programming experience at all using it. Thanks to my personal pal who told me about this. I have earned tons of money by selling my own made mobile apps.

Thioo Faye says:

Kinda reminds me of Qt :)

Ernesto Vargas says:

I read lots of superb opinions on the net about how Devomobiron Secrets (google search it) can help you get money from your first iphone & android apps creation without any programming experience at all. Has any one tried this popular make money from iphone & android apps step by step?

HelloWorld! says:

Here's the source code.

package com.thenewboston.allison;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.RelativeLayout;
import android.widget.Button;

public class MainActivity extends ActionBarActivity {

   @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //Layout
        RelativeLayout buckysLayout = new RelativeLayout(this);

        //Button
        Button redButton = new Button(this);

        //Add widget to layout(button is now a child of layout)
        buckysLayout.addView(redButton);

        //Set this activities content/display to this view
        setContentView(buckysLayout);

    }

   @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

   @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

Marko Serbic says:

I have problem, whenever i open new project i get "rendering problem". When i click rebuild than its ok, can someone explain me why ?

Write a comment