Showing posts with label APPLICATION. Show all posts
Showing posts with label APPLICATION. Show all posts

Wednesday, 7 March 2018

check box with button toast make activity in android with xml and java file

check box with button toast 
checked or unchecked

check_box.xml
check_box.java


check_box.xml preview:-



check_box.xml code :-


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <CheckBox
        android:id="@+id/A1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="A1" />

    <CheckBox
        android:id="@+id/A2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="A2" />

    <CheckBox
        android:id="@+id/A3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="A3" />

    <Button
        android:id="@+id/btn_checkbox"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="submit" />
</LinearLayout>




check_box.java code :-



package com.example.store.gried_and_list_view;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.Toast;

public class check_box extends AppCompatActivity {

    CheckBox A1 ,A2,A3;
    Button btn_checkbox ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        A1 = (CheckBox)findViewById(R.id.A1);
        A2 = (CheckBox)findViewById(R.id.A2);
        A3 = (CheckBox)findViewById(R.id.A3);

        btn_checkbox = (Button)findViewById(R.id.btn_checkbox);

     
     
        //for check and unchecked indivisuale 
      /*  A1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

                if(b){
                    Toast.makeText(check_box.this, A1.getText().toString() + " is checked..", Toast.LENGTH_SHORT).show();
                }
                else {
                    Toast.makeText(check_box.this, A1.getText().toString() + " is unchecked..", Toast.LENGTH_SHORT).show();
                }

            }
        });

        A2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

                if (b){
                    Toast.makeText(check_box.this, A2.getText().toString()+"is checked", Toast.LENGTH_SHORT).show();
                }
                else {
                    Toast.makeText(check_box.this,A2.getText().toString()+ "is unchecked", Toast.LENGTH_SHORT).show();
                }
            }
        });
        A3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                if (b){
                    Toast.makeText(check_box.this,A3.getText().toString()+ "is checked..", Toast.LENGTH_SHORT).show();
                }
                else {
                    Toast.makeText(check_box.this,A3.getText().toString()+ "is unchecked", Toast.LENGTH_SHORT).show();
                }
            }
        });
        */

        btn_checkbox.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String s= "";
                if (A1.isChecked()){
                    s=A1.getText().toString()+"is checked ...";
                }
                if (A2.isChecked()){
                    s=s+A2.getText().toString()+"is checked ...";
                }
                if (A3.isChecked()){
                    s=s+A3.getText().toString()+"is checked ...";
                }
                Toast.makeText(check_box.this, s, Toast.LENGTH_SHORT).show();
            }
        });

    }
}


video preview for that activity:-








Sunday, 25 February 2018

WHAT IS ANDROID ?

hello
,

we study about android in that blog post 's various day by day ,,


we started form the some introduction from android system

and than we are covered some TUTORIAL  most of cover EXAMPLES with code and other
covered to how anyone android application without , maximum pay frees or education .


WHAT IS ANDROID ? 

Android is a software stack ,of mobile , and many of the smart phone us OS is android 
that includes OS , middle ware, and most we us APPLICATIONS  .


now most important tool is develop to android is SDK ,

it is provides APK to develop application on android plate form 
using a JAVA .






1) APPLICATION

            like also PHONE , BROWSER,GALLERY ,

2) APPLICATION FAME WORK 
          
           LIKE ,,, TELEPHONE MANAGER,,, LOCATION MANAGER (google location and other app us) , NOTIFICATION MANAGER ( us in all application generally notify to phone in main screen , like WHAT'S APP massage notification , and many other one,   )


3) LIBRARIES 
also include SURFACE MANAGER , FREE TYPE now a days WEB KIT , more


4) ANDROID RUN TIME 

       1) Core libraries 
       2) Dalvik virtual Machine 

5) LINUX KERNEL

      ti is section of driver like some us full to run hard ware and cancers , tough pad , camera
in that include driver some example   
  • Display Driver
  • Camera Driver
  • Flash Memory Driver
  • AudioDriver
  • WI-FI Driver
  • Power Management







we meet to next blog for more information and start programming android and some set -up studio 

thank you

  

B Remi Calculator

Loan Calculator Loan Calculator Loan Amount PF Cross Sell (LI % GI) No Yes EMI CARD No Ye...