I don't understand0 what you are asking... storing a value in a database
should be pretty straightforward.  What have you tried so far for storing a
value in a database?

On Tue, Jan 12, 2016, 9:11 AM Fernando Nicolei Esperida <
fernandonico...@gmail.com> wrote:

> I Am Creating A Voting App For Our School And I Need A To Create A
> Database To Store The Votes. This Is The video
> <https://drive.google.com/file/d/0B_2yEG1zhfxwNTlWSlc4Zjc4QWM/view?usp=sharing>
>  This
> Is The Result Activity <http://i.stack.imgur.com/9eVTV.png>
>
> This Is The Result.java
>
>  package com.unicorninteractive.ssgelectionmobilerssths;
>
>     import android.database.sqlite.SQLiteDatabase;
>     import android.os.Bundle;
>     import android.support.v7.app.AppCompatActivity;
>     import android.widget.Button;
>     import android.widget.TextView;
>
>     public class results extends AppCompatActivity {
>
>         @Override
>         protected void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.activity_results);
>
>
>    }}
>
> And This Is The President.java (Voting Activity)
>
> package com.unicorninteractive.ssgelectionmobilerssths;
>
> import android.content.Intent;
> import android.support.v7.app.AppCompatActivity;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.Button;
> import android.widget.RadioButton;
> import android.widget.Toast;
> public class President extends AppCompatActivity {
> Button btn_votep;
> @Override
> protected void onCreate(Bundle savedInstanceState) {
>     super.onCreate(savedInstanceState);
>     setContentView(R.layout.activity_president);
>     btn_votep = (Button) findViewById(R.id.btn_votep);
>     btn_votep.setOnClickListener(btnlistener);
>     Toast toast=Toast.makeText(this, "Your Vote Is Now Counted", 
> Toast.LENGTH_LONG);
>     toast.show();
> }
> public void onRadioButtonClicked(View view) {
>     // Is the button now checked?
>     boolean checked = ((RadioButton) view).isChecked();
>
>     // Check which radio button was clicked
>     switch(view.getId()) {
>         case R.id.rb_p1:
>             if (checked)
>                 // President 1
>                 break;
>         case R.id.rb_p2:
>             if (checked)
>                 // President 2
>                 break;
>     }}
>
>
> private View.OnClickListener btnlistener = new  View.OnClickListener(){
>
>     @Override
>     public void onClick(View v) {
>         Intent intent = new Intent(President.this , Vicepresident.class);
>         startActivity(intent);
>        }
>      };
>    }
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/649dbb60-5c9a-4db0-8821-62f62393890c%40googlegroups.com
> <https://groups.google.com/d/msgid/android-developers/649dbb60-5c9a-4db0-8821-62f62393890c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAOq06s-Ei8RDbfXYO9TE23pK4zzC6nbb3OrG6t5xoRa7Wg_EDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to