-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
7,094 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
plugins { | ||
id 'com.android.application' | ||
} | ||
|
||
android { | ||
compileSdk 31 | ||
|
||
defaultConfig { | ||
applicationId "com.example.ourproject01" | ||
minSdk 21 | ||
targetSdk 31 | ||
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.1' | ||
implementation 'com.google.android.material:material:1.4.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0' | ||
implementation 'androidx.legacy:legacy-support-v4:1.0.0' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.example.ourproject01", | ||
"variantName": "debug", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 1, | ||
"versionName": "1.0", | ||
"outputFile": "app-debug.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.ourproject01"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.OurProject01"> | ||
<activity | ||
android:name=".ResultActivity" | ||
android:parentActivityName=".MainActivity" | ||
android:exported="true" | ||
/> | ||
<activity | ||
android:name=".MainActivity" | ||
android:screenOrientation="portrait" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
270 changes: 270 additions & 0 deletions
270
app/src/main/java/com/example/ourproject01/AshbalFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
273 changes: 273 additions & 0 deletions
273
app/src/main/java/com/example/ourproject01/BeeTeamFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
276 changes: 276 additions & 0 deletions
276
app/src/main/java/com/example/ourproject01/Gawala_BoysFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
274 changes: 274 additions & 0 deletions
274
app/src/main/java/com/example/ourproject01/Gawala_GirlsFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/example/ourproject01/HomeFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.example.ourproject01; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.fragment.app.Fragment; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.Button; | ||
|
||
public class HomeFragment extends Fragment { | ||
|
||
@Override | ||
public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
Bundle savedInstanceState) { | ||
View view = inflater.inflate(R.layout.fragment_home, container, false); | ||
return view; | ||
} | ||
|
||
} |
273 changes: 273 additions & 0 deletions
273
app/src/main/java/com/example/ourproject01/KashafFragment.java
Large diffs are not rendered by default.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
app/src/main/java/com/example/ourproject01/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.example.ourproject01; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.fragment.app.Fragment; | ||
import androidx.fragment.app.FragmentTransaction; | ||
|
||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.AdapterView; | ||
import android.widget.ArrayAdapter; | ||
import android.widget.Button; | ||
import android.widget.Spinner; | ||
import android.widget.Toast; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
Spinner teamspinner; | ||
BeeTeamFragment beeteamfragment; | ||
AshbalFragment ashbalfragment; | ||
ZahratFragment zahratFragment; | ||
HomeFragment homefragment; | ||
Gawala_BoysFragment gawalaBoysFragment; | ||
Gawala_GirlsFragment gawalaGirlsFragment; | ||
Mor4edatFragment mor4edatFragment; | ||
Morsha7_BoysFragment morsha7BoysFragment; | ||
Morsha7_GirlsFragment morsha7GirlsFragment; | ||
KashafFragment kashafFragment; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
//to hide the project name bar | ||
getSupportActionBar().hide(); | ||
|
||
homefragment= new HomeFragment(); | ||
beeteamfragment= new BeeTeamFragment(); | ||
ashbalfragment= new AshbalFragment(); | ||
zahratFragment=new ZahratFragment(); | ||
mor4edatFragment=new Mor4edatFragment(); | ||
morsha7BoysFragment=new Morsha7_BoysFragment(); | ||
morsha7GirlsFragment=new Morsha7_GirlsFragment(); | ||
gawalaBoysFragment=new Gawala_BoysFragment(); | ||
gawalaGirlsFragment=new Gawala_GirlsFragment(); | ||
kashafFragment=new KashafFragment(); | ||
teamspinner=findViewById(R.id.spinner); | ||
|
||
String[] teams = new String[]{"اختار الفريق ","Bee Team","أشبال","زهرات","كشاف","مرشدات","مرشح جوالة (و)","مرشح جوالة (ب)","جوالة (و)","جوالة (ب)"}; | ||
ArrayAdapter<String> teamsadapter =new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, teams); | ||
teamsadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); | ||
teamspinner.setAdapter(teamsadapter); | ||
teamspinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | ||
@Override | ||
public void onItemSelected(AdapterView<?> adapterView, View view, int pos, long l) { | ||
switch (pos) { | ||
case 0: | ||
selectFragment(homefragment); | ||
break; | ||
case 1: | ||
selectFragment(beeteamfragment); | ||
break; | ||
case 2: | ||
selectFragment(ashbalfragment); | ||
break; | ||
case 3: | ||
selectFragment(zahratFragment); | ||
break; | ||
case 4: | ||
selectFragment(kashafFragment); | ||
break; | ||
case 5: | ||
selectFragment(mor4edatFragment); | ||
break; | ||
case 6: | ||
selectFragment(morsha7BoysFragment); | ||
break; | ||
case 7: | ||
selectFragment(morsha7GirlsFragment); | ||
break; | ||
case 8: | ||
selectFragment(gawalaBoysFragment); | ||
break; | ||
case 9: | ||
selectFragment(gawalaGirlsFragment); | ||
break; | ||
} | ||
} | ||
@Override | ||
public void onNothingSelected(AdapterView<?> adapterView) { | ||
} | ||
}); | ||
|
||
|
||
} | ||
|
||
private void selectFragment(Fragment fragment) { | ||
FragmentTransaction fragmentrransaction; | ||
fragmentrransaction= getSupportFragmentManager().beginTransaction(); | ||
fragmentrransaction.replace(R.id.fraglayout, fragment); | ||
fragmentrransaction.commit(); | ||
} | ||
} |
Oops, something went wrong.