ANDROID : LATEST TECHNOLOGY

!!! WANT TO LEARN ANDROID  !!!


<<< START IT FROM TODAY >>>

DOWNLOAD THIS E-BOOK 

BOOK 1 * (4.2/5)

BOOK 2 * (3.9/5)
(*USE ANY WHICH YOU FEEL EASIER)


TUTORIALS WILL BE UPLOADED HERE DAY BY DAY....LEARN ANDROID FROM THIS : http://androidngeeks.blogspot.in/


USE THIS CODE FOR ALL APPLICATION


1. Register Activity : [AndroidManifest.xml]
            <activity android:name=".SecondActivity" android:label="@string/app_name">

      </activity>

2. Create An Intent : [<activityClassNAme.java>]
      startActivity(new Intent("second"));

3. Button: [<activityClassNAme.java>]
            Button mybtn=(Button)findViewById(R.id.button);

4. ClickListener:[<activityClassNAme.java>]
      1. after "extends Activity" "implements OnClickListene"
     
      2. mybtn.setOnClickListener(this);
      // outside function & inside activity class
      public void onClick(View v) {
            startActivity(new Intent("second"));     
      }

5. SecondActivity:[<activityClassNAme.java>]
            @Override
            protected void onCreate(Bundle savedInstanceState) {
                        super.onCreate(savedInstanceState);
                        setContentView(R.layout.second);
            }

6. ListView:
            1.  import android.app.ListActivity;
      2. extends ListActivity{  //not Activity this time
      3. String str[]={"One","Two"};
          setListAdapter(new ArrayAdapter<String>(this,           R.layout.main,R.id.label,str));
      4. [in "main.xml" at "res->layout->"]
            <TextView  …..
             /TextView>

7. Toast
      Toast.makeText(this,”Your Message”,Toast.Length_Short).show();

8. Alert
      AlertDialog.Builder alert = new AlertDialog.Builder(AlertDemoActivity.this);
      alert.setTitle("My Alert of Tsunami");
      alert.setMessage("No need to worry about Tsunami. It's Safe.");
      alert.setIcon(R.drawable.geekslab_icon);
      alert.show();

All the codes can be found in given applications

ALL THE BEST 


Share on Google Plus

About Rakshit Shah

Get my stories in your feeds by subscribing to me, or become a vocal+ member to read all stories of thousands of other writers, participate in all challenges and get a payout with low fees and less payout threshold on Vocal Media.

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Don't Be Selfish! Share It!