Skip to content

Commit b7fa7ea

Browse files
Create project
1 parent 83209d0 commit b7fa7ea

35 files changed

+892
-0
lines changed

Diff for: .gitignore

+223
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/androidstudio,android,java,gradle
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=androidstudio,android,java,gradle
3+
4+
### Android ###
5+
# Gradle files
6+
.gradle/
7+
build/
8+
9+
# Local configuration file (sdk path, etc)
10+
local.properties
11+
12+
# Log/OS Files
13+
*.log
14+
15+
# Android Studio generated files and folders
16+
captures/
17+
.externalNativeBuild/
18+
.cxx/
19+
*.apk
20+
output.json
21+
22+
# IntelliJ
23+
*.iml
24+
.idea/
25+
misc.xml
26+
deploymentTargetDropDown.xml
27+
render.experimental.xml
28+
29+
# Keystore files
30+
*.jks
31+
*.keystore
32+
33+
# Google Services (e.g. APIs or Firebase)
34+
google-services.json
35+
36+
# Android Profiling
37+
*.hprof
38+
39+
### Android Patch ###
40+
gen-external-apklibs
41+
42+
# Replacement of .externalNativeBuild directories introduced
43+
# with Android Studio 3.5.
44+
45+
### Java ###
46+
# Compiled class file
47+
*.class
48+
49+
# Log file
50+
51+
# BlueJ files
52+
*.ctxt
53+
54+
# Mobile Tools for Java (J2ME)
55+
.mtj.tmp/
56+
57+
# Package Files #
58+
*.jar
59+
*.war
60+
*.nar
61+
*.ear
62+
*.zip
63+
*.tar.gz
64+
*.rar
65+
66+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
67+
hs_err_pid*
68+
replay_pid*
69+
70+
### Gradle ###
71+
.gradle
72+
**/build/
73+
!src/**/build/
74+
75+
# Ignore Gradle GUI config
76+
gradle-app.setting
77+
78+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
79+
!gradle-wrapper.jar
80+
81+
# Avoid ignore Gradle wrappper properties
82+
!gradle-wrapper.properties
83+
84+
# Cache of project
85+
.gradletasknamecache
86+
87+
# Eclipse Gradle plugin generated files
88+
# Eclipse Core
89+
.project
90+
# JDT-specific (Eclipse Java Development Tools)
91+
.classpath
92+
93+
### Gradle Patch ###
94+
# Java heap dump
95+
96+
### AndroidStudio ###
97+
# Covers files to be ignored for android development using Android Studio.
98+
99+
# Built application files
100+
*.ap_
101+
*.aab
102+
103+
# Files for the ART/Dalvik VM
104+
*.dex
105+
106+
# Java class files
107+
108+
# Generated files
109+
bin/
110+
gen/
111+
out/
112+
113+
# Gradle files
114+
115+
# Signing files
116+
.signing/
117+
118+
# Local configuration file (sdk path, etc)
119+
120+
# Proguard folder generated by Eclipse
121+
proguard/
122+
123+
# Log Files
124+
125+
# Android Studio
126+
/*/build/
127+
/*/local.properties
128+
/*/out
129+
/*/*/build
130+
/*/*/production
131+
.navigation/
132+
*.ipr
133+
*~
134+
*.swp
135+
136+
# Keystore files
137+
138+
# Google Services (e.g. APIs or Firebase)
139+
# google-services.json
140+
141+
# Android Patch
142+
143+
# External native build folder generated in Android Studio 2.2 and later
144+
.externalNativeBuild
145+
146+
# NDK
147+
obj/
148+
149+
# IntelliJ IDEA
150+
*.iws
151+
/out/
152+
153+
# User-specific configurations
154+
.idea/caches/
155+
.idea/libraries/
156+
.idea/shelf/
157+
.idea/workspace.xml
158+
.idea/tasks.xml
159+
.idea/.name
160+
.idea/compiler.xml
161+
.idea/copyright/profiles_settings.xml
162+
.idea/encodings.xml
163+
.idea/misc.xml
164+
.idea/modules.xml
165+
.idea/scopes/scope_settings.xml
166+
.idea/dictionaries
167+
.idea/vcs.xml
168+
.idea/jsLibraryMappings.xml
169+
.idea/datasources.xml
170+
.idea/dataSources.ids
171+
.idea/sqlDataSources.xml
172+
.idea/dynamic.xml
173+
.idea/uiDesigner.xml
174+
.idea/assetWizardSettings.xml
175+
.idea/gradle.xml
176+
.idea/jarRepositories.xml
177+
.idea/navEditor.xml
178+
179+
# Legacy Eclipse project files
180+
.cproject
181+
.settings/
182+
183+
# Mobile Tools for Java (J2ME)
184+
185+
# Package Files #
186+
187+
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
188+
189+
## Plugin-specific files:
190+
191+
# mpeltonen/sbt-idea plugin
192+
.idea_modules/
193+
194+
# JIRA plugin
195+
atlassian-ide-plugin.xml
196+
197+
# Mongo Explorer plugin
198+
.idea/mongoSettings.xml
199+
200+
# Crashlytics plugin (for Android Studio and IntelliJ)
201+
com_crashlytics_export_strings.xml
202+
crashlytics.properties
203+
crashlytics-build.properties
204+
fabric.properties
205+
206+
### AndroidStudio Patch ###
207+
208+
!/gradle/wrapper/gradle-wrapper.jar
209+
210+
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,android,java,gradle
211+
212+
/local.properties
213+
/.idea/caches
214+
/.idea/libraries
215+
/.idea/modules.xml
216+
/.idea/workspace.xml
217+
/.idea/navEditor.xml
218+
/.idea/assetWizardSettings.xml
219+
.DS_Store
220+
/build
221+
/captures
222+
.cxx
223+

Diff for: app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Diff for: app/build.gradle

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
plugins {
2+
id 'com.android.application'
3+
}
4+
5+
android {
6+
namespace 'com.example.votingapp'
7+
compileSdk 32
8+
9+
defaultConfig {
10+
applicationId "com.example.votingapp"
11+
minSdk 23
12+
targetSdk 32
13+
versionCode 1
14+
versionName "1.0"
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
compileOptions {
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
targetCompatibility JavaVersion.VERSION_1_8
28+
}
29+
}
30+
31+
dependencies {
32+
33+
implementation 'androidx.appcompat:appcompat:1.5.1'
34+
implementation 'com.google.android.material:material:1.7.0'
35+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36+
testImplementation 'junit:junit:4.13.2'
37+
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
38+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
39+
}

Diff for: app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.example.votingapp;
2+
3+
import android.content.Context;
4+
5+
import androidx.test.platform.app.InstrumentationRegistry;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
8+
import org.junit.Test;
9+
import org.junit.runner.RunWith;
10+
11+
import static org.junit.Assert.*;
12+
13+
/**
14+
* Instrumented test, which will execute on an Android device.
15+
*
16+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
17+
*/
18+
@RunWith(AndroidJUnit4.class)
19+
public class ExampleInstrumentedTest {
20+
21+
@Test
22+
public void useAppContext() {
23+
// Context of the app under test.
24+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
25+
assertEquals("com.example.votingapp", appContext.getPackageName());
26+
}
27+
}

Diff for: app/src/main/AndroidManifest.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:dataExtractionRules="@xml/data_extraction_rules"
8+
android:fullBackupContent="@xml/backup_rules"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:roundIcon="@mipmap/ic_launcher_round"
12+
android:supportsRtl="true"
13+
android:theme="@style/Theme.VotingApp"
14+
tools:targetApi="31">
15+
<activity
16+
android:name=".LoginActivity"
17+
android:exported="true">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN"/>
20+
21+
<category android:name="android.intent.category.LAUNCHER"/>
22+
</intent-filter>
23+
24+
<meta-data
25+
android:name="android.app.lib_name"
26+
android:value=""/>
27+
</activity>
28+
</application>
29+
30+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.example.votingapp;
2+
3+
import androidx.appcompat.app.AppCompatActivity;
4+
5+
import android.os.Bundle;
6+
7+
public class LoginActivity extends AppCompatActivity {
8+
9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(savedInstanceState);
12+
setContentView(R.layout.activity_login);
13+
}
14+
}

0 commit comments

Comments
 (0)