Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasantony12 committed May 15, 2024
1 parent 060cc5b commit 0413470
Show file tree
Hide file tree
Showing 83 changed files with 2,341 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions bvote android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Thu Jun 10 12:36:15 IST 2021
gradle.version=6.7.1
Binary file not shown.
Binary file added bvote android/.gradle/checksums/checksums.lock
Binary file not shown.
Binary file added bvote android/.gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions bvote android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions bvote android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions bvote android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions bvote android/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions bvote android/.idea/modules/PollingSystem.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
1 change: 1 addition & 0 deletions bvote android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
39 changes: 39 additions & 0 deletions bvote android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.example.pollingsystem"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
21 changes: 21 additions & 0 deletions bvote android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.pollingsystem;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.pollingsystem", appContext.getPackageName());
}
}
36 changes: 36 additions & 0 deletions bvote android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pollingsystem">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@drawable/vote"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.PollingSystem">
<activity android:name=".View_result"></activity>
<activity android:name=".Make_vote" />
<activity android:name=".View_election_status" />
<activity android:name=".View_booth" />
<activity android:name=".View_district" />
<activity android:name=".View_candidate" />
<activity android:name=".Home" />
<activity android:name=".Login" />
<activity android:name=".IPsettings" >

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<activity android:name=".MainActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.example.pollingsystem;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Home extends AppCompatActivity {
Button b1, b2, b3, b4;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);

b1 = (Button) findViewById(R.id.btcandidate);
b2 = (Button) findViewById(R.id.btdistrict);
b3 = (Button) findViewById(R.id.btelection);
b4 = (Button) findViewById(R.id.btlogout);

b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

startActivity(new Intent(getApplicationContext(), View_candidate.class));
}
});

b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

startActivity(new Intent(getApplicationContext(), View_district.class));
}
});

b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

startActivity(new Intent(getApplicationContext(), View_election_status.class));
}
});

b4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

startActivity(new Intent(getApplicationContext(), Login.class));
}
});
}

public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
Intent b = new Intent(getApplicationContext(), Home.class);
startActivity(b);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package com.example.pollingsystem;



import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class IPsettings extends Activity {
EditText etip;
Button btip;

SharedPreferences sh;
public static String ip;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ipsettings);
etip=(EditText)findViewById(R.id.etip);

btip=(Button)findViewById(R.id.btsubmit);

sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
etip.setText(sh.getString("ip", ""));

btip.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub

ip=etip.getText().toString();
if(etip.getText().toString().equals(""))
{
etip.setError("Enter IP Address");
etip.setFocusable(true);
}
else
{
Editor e=sh.edit();
e.putString("ip", ip);
e.commit();
startActivity(new Intent(getApplicationContext(),Login.class));
}

}
});

}


public void onBackPressed()
{
// TODO Auto-generated method stub
new AlertDialog.Builder(this).setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("Exit :")
.setMessage("Exit ...?")
.setPositiveButton("Yes",new DialogInterface.OnClickListener()
{

@Override
public void onClick(DialogInterface arg0, int arg1)
{
// TODO Auto-generated method stub
Intent i=new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
finish();
}
}).setNegativeButton("No",null).show();

}

}
Loading

0 comments on commit 0413470

Please sign in to comment.