Initial commit

This commit is contained in:
2018-12-30 13:56:40 +11:00
commit 78350e8b46
93 changed files with 2785 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

BIN
.idea/caches/build_file_checksums.ser generated Normal file

Binary file not shown.

29
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,29 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>

18
.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

38
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

9
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Alameera.iml" filepath="$PROJECT_DIR$/Alameera.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>

12
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

44
app/build.gradle Normal file
View File

@@ -0,0 +1,44 @@
apply plugin: 'com.android.application'
android {
signingConfigs {
}
compileSdkVersion 28
defaultConfig {
applicationId "com.example.h_mal.alameera"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-vector-drawable:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.github.alamkanak:android-week-view:1.2.6'
implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'

73
app/google-services.json Normal file
View File

@@ -0,0 +1,73 @@
{
"project_info": {
"project_number": "238412654464",
"firebase_url": "https://al-ameera.firebaseio.com",
"project_id": "al-ameera",
"storage_bucket": "al-ameera.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:238412654464:android:922ca6da2bd5c84b",
"android_client_info": {
"package_name": "com.example.h_mal"
}
},
"oauth_client": [
{
"client_id": "238412654464-ldlrok937aln4ivv7fu3gbt6pf9ns3aj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC2beMMQJCsQBBNu1kDHMNSI5_tkYEldT8"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:238412654464:android:084541675aa638f7",
"android_client_info": {
"package_name": "com.example.h_mal.alameera"
}
},
"oauth_client": [
{
"client_id": "238412654464-ldlrok937aln4ivv7fu3gbt6pf9ns3aj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC2beMMQJCsQBBNu1kDHMNSI5_tkYEldT8"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}

21
app/proguard-rules.pro vendored Normal file
View File

@@ -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

View File

@@ -0,0 +1,26 @@
package com.example.h_mal.alameera;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.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() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.h_mal.alameera", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.h_mal.alameera">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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/AppTheme.NoActionBar">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".BasketActivity" android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".MediaActivity" android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".ServiceActivity" android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".LoginActivity" android:parentActivityName=".MainActivity">
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,16 @@
package com.example.h_mal.alameera;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class BasketActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_basket);
CustomAppBarClass newbar = new CustomAppBarClass(this);
newbar.SetpUpBar();
}
}

View File

@@ -0,0 +1,30 @@
package com.example.h_mal.alameera;
/**
* Created by h_mal on 09/09/2018.
*/
class Booking {
private String bookingName;
private String bookingTimes;
private String bookingService;
public Booking(String bookingName, String bookingTimes, String bookingService) {
this.bookingName = bookingName;
this.bookingTimes = bookingTimes;
this.bookingService = bookingService;
}
public String getBookingName() {
return bookingName;
}
public String getBookingTimes() {
return bookingTimes;
}
public String getBookingService() {
return bookingService;
}
}

View File

@@ -0,0 +1,29 @@
package com.example.h_mal.alameera;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.List;
/**
* Created by h_mal on 09/09/2018.
*/
public class BookingAdapter extends ArrayAdapter<Booking>{
public BookingAdapter(@NonNull Context context, @NonNull List<Booking> objects) {
super(context, 0, objects);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
return convertView;
}
}

View File

@@ -0,0 +1,74 @@
package com.example.h_mal.alameera;
import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.NavUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import static android.support.v4.content.ContextCompat.startActivity;
/**
* Created by h_mal on 11/09/2018.
*/
public class CustomAppBarClass {
private Activity activity;
public CustomAppBarClass(Activity activity) {
this.activity = activity;
}
public void SetpUpBar(){
View viewGroupAppBar = activity.findViewById(R.id.appbar);
ImageView back = viewGroupAppBar.findViewById(R.id.back_icon);
ImageView profile = viewGroupAppBar.findViewById(R.id.action_bar_profile);
if ((activity.getClass().toString()).equals(MainActivity.class.toString())) {
back.setVisibility(View.GONE);
profile.setVisibility(View.VISIBLE);
profile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
(MainActivity.drawerLayout).openDrawer(Gravity.START);
Log.i("", "onClick: Mainactivity");
}
});
}else{
profile.setVisibility(View.GONE);
back.setVisibility(View.VISIBLE);
back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(activity);
}
});
}
ImageView basket = viewGroupAppBar.findViewById(R.id.action_bar_basket);
basket.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(activity, BasketActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(activity,intent,null);
}
});
ImageView test = this.activity.findViewById(R.id.action_bar_social);
test.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(activity, MediaActivity.class);
startActivity(activity,intent,null);
}
});
}
}

View File

@@ -0,0 +1,40 @@
package com.example.h_mal.alameera;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import java.util.ArrayList;
public class FragmentFive extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_five, container, false);
GridView gridLayout = rootView.findViewById(R.id.loyalty_card_view);
ArrayList<Boolean> booleans = new ArrayList<>();
booleans.add(true);
booleans.add(false);
booleans.add(false);
booleans.add(false);
booleans.add(false);
booleans.add(false);
booleans.add(false);
booleans.add(false);
LoyaltyAdapter adapter = new LoyaltyAdapter(getActivity(),booleans);
gridLayout.setAdapter(adapter);
return rootView;
}
}

View File

@@ -0,0 +1,40 @@
package com.example.h_mal.alameera;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import com.example.h_mal.alameera.FragmentOne.HomeScreenItemAdapter;
import com.example.h_mal.alameera.FragmentOne.HomeScreenItems;
import java.util.ArrayList;
public class FragmentFour extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_four, container, false);
ListView lv = rootView.findViewById(R.id.listViewServices);
ArrayList<HomeScreenItems> items = new ArrayList<>();
items.add(new HomeScreenItems(R.drawable.hamma,"Hammam Bath"));
items.add(new HomeScreenItems(R.drawable.earring,"Earrings"));
items.add(new HomeScreenItems(R.drawable.hairmist,"Hair Mist"));
items.add(new HomeScreenItems(R.drawable.hair,"Hair"));
items.add(new HomeScreenItems(R.drawable.nails,"Nails"));
HomeScreenItemAdapter adapter = new HomeScreenItemAdapter(getContext(),items);
lv.setAdapter(adapter);
return rootView;
}
}

View File

@@ -0,0 +1,54 @@
package com.example.h_mal.alameera;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import com.example.h_mal.alameera.FragmentOne.HomeScreenItemAdapter;
import com.example.h_mal.alameera.FragmentOne.HomeScreenItems;
import java.util.ArrayList;
public class FragmentHome extends Fragment{
private HomeScreenItemAdapter adapter;
private ArrayList<HomeScreenItems> items;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_home, container, false);
ListView lv = rootView.findViewById(R.id.listView);
items = new ArrayList<>();
items.add(new HomeScreenItems(R.drawable.hair,"Hair"));
items.add(new HomeScreenItems(R.drawable.nails,"Nails"));
items.add(new HomeScreenItems(R.drawable.hamma,"Hammam Bath"));
items.add(new HomeScreenItems(R.drawable.earring,"Earrings"));
items.add(new HomeScreenItems(R.drawable.hairmist,"Hair Mist"));
adapter = new HomeScreenItemAdapter(getContext(),items);
lv.setAdapter(adapter);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent i = new Intent(getActivity(),ServiceActivity.class);
startActivity(i);
}
});
return rootView;
}
}

View File

@@ -0,0 +1,48 @@
package com.example.h_mal.alameera.FragmentOne;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.h_mal.alameera.R;
import java.util.ArrayList;
/**
* Created by h_mal on 22/08/2018.
*/
public class HomeScreenItemAdapter extends ArrayAdapter<HomeScreenItems>{
public HomeScreenItemAdapter(@NonNull Context context, @NonNull ArrayList<HomeScreenItems> objects) {
super(context, 0, objects);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View listItemView = convertView;
if (listItemView == null) {
listItemView = LayoutInflater.from(getContext()).inflate(
R.layout.home_screen_list_item, parent, false);
}
HomeScreenItems currentItem = getItem(position);
ImageView homeScreenImageView = listItemView.findViewById(R.id.home_item_imageView);
homeScreenImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
homeScreenImageView.setImageResource(currentItem.getImg());
TextView homeScreenTextView = listItemView.findViewById(R.id.home_item_textView);
homeScreenTextView.setText(currentItem.getTitle());
return listItemView;
}
}

View File

@@ -0,0 +1,24 @@
package com.example.h_mal.alameera.FragmentOne;
/**
* Created by h_mal on 22/08/2018.
*/
public class HomeScreenItems {
private int img;
private String title;
public HomeScreenItems(int img, String title) {
this.img = img;
this.title = title;
}
public int getImg() {
return img;
}
public String getTitle() {
return title;
}
}

View File

@@ -0,0 +1,87 @@
package com.example.h_mal.alameera;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ListView;
import android.widget.ProgressBar;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
public class FragmentThree extends Fragment {
private DatabaseReference productsDB;
private Product currentProduct;
private String TAG = "fragmentThree";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_three, container, false);
final ListView listView = rootView.findViewById(R.id.listViewProducts);
final ProgressBar pb = rootView.findViewById(R.id.fragProgress);
listView.setVisibility(View.INVISIBLE);
final ArrayList<Product> products = new ArrayList<Product>();
productsDB = FirebaseDatabase.getInstance().getReference("Products");
productsDB.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
products.clear();
for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {
Product retrievedProduct = postSnapshot.getValue(Product.class);
//adding artist to the list
products.add(retrievedProduct);
}
Log.i(TAG, "onDataChange: current products: " + products.size() + "\n" +
"product image: " + products.get(0).getProductImage());
ProductsAdapter adapter = new ProductsAdapter(getActivity(),products,pb);
listView.setAdapter(adapter);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
Log.i(TAG, "onCancelled: "+ databaseError);
}
});
pb.setTag(pb.getVisibility());
pb.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
int newVis = pb.getVisibility();
if((int)pb.getTag() != newVis)
{
pb.setTag(pb.getVisibility());
//visibility has changed
listView.setVisibility(View.VISIBLE);
}
}
});
return rootView;
}
}

View File

@@ -0,0 +1,103 @@
package com.example.h_mal.alameera;
import android.graphics.RectF;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.alamkanak.weekview.MonthLoader;
import com.alamkanak.weekview.WeekView;
import com.alamkanak.weekview.WeekViewEvent;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class FragmentTwo extends Fragment {
WeekView mWeekView;
List<WeekViewEvent> events = new ArrayList<WeekViewEvent>();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_two, container, false);
// ListView bookingsListView = rootView.findViewById(R.id.listViewBookings);
// ArrayList<Booking> bookingEntry = new ArrayList<>();
// bookingEntry.add(new Booking())
// BookingAdapter adapter = new BookingAdapter(getActivity(),);
// bookingsListView.setAdapter(adapter);
mWeekView = (WeekView) rootView.findViewById(R.id.weekView);
if ((MainActivity.mAuth).getCurrentUser() == null){
mWeekView.setVisibility(View.GONE);
}else {
mWeekView.setOnEventClickListener(new WeekView.EventClickListener() {
@Override
public void onEventClick(WeekViewEvent event, RectF eventRect) {
}
});
mWeekView.setMonthChangeListener(new MonthLoader.MonthChangeListener() {
@Override
public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {
return events;
}
});
mWeekView.setEmptyViewClickListener(new WeekView.EmptyViewClickListener() {
@Override
public void onEmptyViewClicked(Calendar time) {
// openDialog(time);
}
});
}
return rootView;
}
// private void openDialog(final Calendar time) {
// final EditText edittext = new EditText(getActivity());
// AlertDialog dialog = new AlertDialog.Builder(getActivity())
// .setTitle("Select Duration")
// .setView(edittext)
// .setPositiveButton("Add", new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// int duration = Integer.parseInt(edittext.getText().toString());
// CreateCalenderEntry(time, duration);
// }
// })
// .setNegativeButton("Cancel", null)
// .create();
// dialog.show();
// }
//
// private void CreateCalenderEntry(Calendar time, int duration){
// Calendar endTime = Calendar.getInstance();
// endTime.set(time.get(Calendar.YEAR),
// time.get(Calendar.MONTH),
// time.get(Calendar.DAY_OF_MONTH),
// (time.get(Calendar.HOUR_OF_DAY)+duration),
// time.get(Calendar.MINUTE));
// WeekViewEvent event = new WeekViewEvent(1, "added event", time, endTime);
// events.add(event);
// mWeekView.notifyDatasetChanged();
// }
//
// private String CalenderToString(Calendar item){
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy MMM dd HH:mm:ss");
// return sdf.format(item.getTime());
// }
}

View File

@@ -0,0 +1,72 @@
package com.example.h_mal.alameera;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class LoginActivity extends AppCompatActivity {
private static final String TAG = "Firebase";
private FirebaseAuth mAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
CustomAppBarClass newbar = new CustomAppBarClass(this);
newbar.SetpUpBar();
mAuth = FirebaseAuth.getInstance();
Log.i(getClass().toString(), "onCreate: "+mAuth.getCurrentUser() );
final Activity activity = this;
final EditText email = findViewById(R.id.email);
final EditText password = findViewById(R.id.password);
Button login = findViewById(R.id.login_button);
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String emailString = email.getText().toString();
String passwordString = password.getText().toString();
mAuth.signInWithEmailAndPassword(emailString,passwordString)
.addOnCompleteListener(activity, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d(TAG, "signInWithEmail:success");
FirebaseUser user = mAuth.getCurrentUser();
Intent i = new Intent(LoginActivity.this,MainActivity.class);
startActivity(i);
} else {
// If sign in fails, display a message to the user.
Log.w(TAG, "signInWithEmail:failure", task.getException());
Toast.makeText(LoginActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
}
}
});
}
});
}
}

View File

@@ -0,0 +1,46 @@
package com.example.h_mal.alameera;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import java.util.List;
/**
* Created by h_mal on 08/09/2018.
*/
public class LoyaltyAdapter extends ArrayAdapter<Boolean> {
public LoyaltyAdapter(@NonNull Context context, @NonNull List<Boolean> objects) {
super(context, 0, objects);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View listItemView = convertView;
if (listItemView == null) {
listItemView = LayoutInflater.from(getContext()).inflate(
R.layout.list_item_loyalty, parent, false);
}
Boolean currentBoolean = getItem(position);
ImageView cross = listItemView.findViewById(R.id.cross);
if (currentBoolean){
cross.setVisibility(View.VISIBLE);
}else{
cross.setVisibility(View.GONE);
}
return listItemView;
}
}

View File

@@ -0,0 +1,171 @@
package com.example.h_mal.alameera;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.NavigationView;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.FirebaseDatabase;
public class MainActivity extends AppCompatActivity {
public static DrawerLayout drawerLayout;
public BottomNavigationView navigation;
private SectionsPagerAdapter mSectionsPagerAdapter;
private ViewPager mViewPager;
public static FirebaseDatabase mDatabase;
public static FirebaseAuth mAuth;
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
mViewPager.setCurrentItem(0);
return true;
case R.id.navigation_bookings:
mViewPager.setCurrentItem(1);
return true;
case R.id.navigation_products:
mViewPager.setCurrentItem(2);
return true;
case R.id.navigation_services:
mViewPager.setCurrentItem(3);
return true;
case R.id.navigation_loyalty_card:
mViewPager.setCurrentItem(4);
return true;
}
return false;
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_2);
CustomAppBarClass newbar = new CustomAppBarClass(this);
newbar.SetpUpBar();
FirebaseApp.initializeApp(this);
mDatabase = FirebaseDatabase.getInstance();
mAuth = FirebaseAuth.getInstance();
Log.i(getClass().toString(), "onCreate: "+mAuth.getCurrentUser() );
navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
navigation.getMenu().getItem(position).setChecked(true);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
drawerLayout = findViewById(R.id.main_content);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawerLayout, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawerLayout.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.drawer);
navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.drawer_profile:
Log.i("tag","drawer iem pressed");
Intent i = new Intent(MainActivity.this, LoginActivity.class);
startActivity(i);
break;
case R.id.drawer_settings:
// mAuth.signOut();
}
return false;
}
});
}
@Override
public void onBackPressed() {
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position){
case 0:
FragmentHome frag1 = new FragmentHome();
return frag1;
case 1:
FragmentTwo frag2 = new FragmentTwo();
return frag2;
case 2:
FragmentThree frag3 = new FragmentThree();
return frag3;
case 3:
FragmentFour frag4 = new FragmentFour();
return frag4;
case 4:
FragmentFive frag5 = new FragmentFive();
return frag5;
default:
return null;
}
}
@Override
public int getCount() {
// Show 3 total pages.
return 5;
}
}
}

View File

@@ -0,0 +1,69 @@
package com.example.h_mal.alameera;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.GridView;
public class MediaActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_media);
String[] urls = {"https://scontent.cdninstagram.com/vp/88c145b75fa1e3d9117f47f8580419ae/5C2277EC/t51.2885-15/sh0.08/e35/s640x640/38771596_238749096815849_1230150338053406720_n.jpg",
"https://scontent.cdninstagram.com/vp/7d890293e2fba4d70582b32375cf71e5/5C322CFC/t51.2885-15/sh0.08/e35/s640x640/39062496_2142785639319124_5910992730175045632_n.jpg",
"https://scontent.cdninstagram.com/vp/735318253a4ce8c7236501d97acaa64d/5C3227F6/t51.2885-15/sh0.08/e35/s640x640/39028870_1872461566179735_271596500390248448_n.jpg",
"https://scontent.cdninstagram.com/vp/0caf63844f5de2cd4abb0f98cc3d3f5e/5C179D9D/t51.2885-15/sh0.08/e35/s640x640/38081765_216652489032041_4059083826633113600_n.jpg",
"https://scontent.cdninstagram.com/vp/cf8c6c78da13cb6656edf56a78a97cd7/5C312FA7/t51.2885-15/sh0.08/e35/s640x640/38765612_460566954423356_6318058237157441536_n.jpg",
"https://scontent.cdninstagram.com/vp/e963d658036f2121a056f65c89941cd4/5C2842D0/t51.2885-15/sh0.08/e35/s640x640/38957890_256446928313732_8913231619481927680_n.jpg",
"https://scontent.cdninstagram.com/vp/648c0e0a45ce18a73152b75c5267bf33/5C302A8B/t51.2885-15/sh0.08/e35/s640x640/37832517_2124730157848999_4834053723929968640_n.jpg",
"https://scontent.cdninstagram.com/vp/70adf27b9ddd56de875648e762c3487c/5C1CB6C5/t51.2885-15/sh0.08/e35/s640x640/38236748_512938895815366_9171202005413134336_n.jpg",
"https://scontent.cdninstagram.com/vp/ee8fe664b9d8d942775357aa01ae44a7/5C328F30/t51.2885-15/sh0.08/e35/s640x640/38751561_869524503238871_5765603066388676608_n.jpg",
"https://scontent.cdninstagram.com/vp/060617b672136284bac17751094f327e/5C1557D6/t51.2885-15/sh0.08/e35/s640x640/37944746_688496631517727_5580375467807997952_n.jpg",
"https://scontent.cdninstagram.com/vp/7d19e8ee9fe75367fc9e08a701401a92/5C1A7E03/t51.2885-15/sh0.08/e35/s640x640/38232951_1977081345675370_1756124552951234560_n.jpg",
"https://scontent.cdninstagram.com/vp/cac17f50b9d44bac023343b706488a0e/5C1823D4/t51.2885-15/sh0.08/e35/s640x640/38233397_516291448824632_6498309682334007296_n.jpg",
"https://scontent.cdninstagram.com/vp/48320e7628ecdde65e4b6481ccf09282/5C2A13C7/t51.2885-15/sh0.08/e35/s640x640/38072640_269406976997875_5283120759777001472_n.jpg",
"https://scontent.cdninstagram.com/vp/371c2d85f73580841b19edd3e4e49edc/5C2B5E49/t51.2885-15/sh0.08/e35/s640x640/38048315_697554337255907_6426773694894309376_n.jpg",
"https://scontent.cdninstagram.com/vp/b3e83662e901fd9e12be2ec6ecd3ccb8/5C3456BD/t51.2885-15/sh0.08/e35/s640x640/38424195_508198736270374_8861008193006862336_n.jpg",
"https://scontent.cdninstagram.com/vp/6bd964dc8983256a87ccfad715c8d1ce/5C37C180/t51.2885-15/sh0.08/e35/s640x640/38096812_555869778165411_8168457047377969152_n.jpg",
"https://scontent.cdninstagram.com/vp/4419156c789498492cc89ae281eef88b/5C32510F/t51.2885-15/sh0.08/e35/s640x640/38247728_232342714014124_5128838847240601600_n.jpg",
"https://scontent.cdninstagram.com/vp/5fe68f56a243322b423457e34af2ce23/5C2592F4/t51.2885-15/sh0.08/e35/s640x640/37967538_1849715725086077_5096474761131720704_n.jpg",
"https://scontent.cdninstagram.com/vp/1d25a43da22b55ed1e4e10cf51ab26c5/5C1ED467/t51.2885-15/sh0.08/e35/s640x640/37970918_425786541264196_2934713486493614080_n.jpg",
"https://scontent.cdninstagram.com/vp/34fa57a889144d943204f6b1e622c9ac/5C33D628/t51.2885-15/sh0.08/e35/s640x640/38301842_2071421422929584_1504531085353025536_n.jpg",
"https://scontent.cdninstagram.com/vp/840edf8e1a4e4724a30aba5923c2e578/5C29F854/t51.2885-15/sh0.08/e35/s640x640/38162636_439965793182428_2370895163699494912_n.jpg",
"https://scontent.cdninstagram.com/vp/6c524faaee030521edf4bd15285d2296/5C1455EE/t51.2885-15/sh0.08/e35/s640x640/37390228_720398691624494_6843393464000839680_n.jpg",
"https://scontent.cdninstagram.com/vp/4edddca3cedc96d8d84c76aaca2dd469/5C299952/t51.2885-15/sh0.08/e35/s640x640/37245459_247138182770407_5293375793060118528_n.jpg",
"https://scontent.cdninstagram.com/vp/3206eab99db070ab75605c65eac889bf/5C24D074/t51.2885-15/sh0.08/e35/s640x640/36876952_259928678127135_529437904158588928_n.jpg",
"https://scontent.cdninstagram.com/vp/bfcea93f88f8c14f019f992134617953/5C1885D7/t51.2885-15/sh0.08/e35/s640x640/37056213_210488859657750_1150226013196648448_n.jpg",
"https://scontent.cdninstagram.com/vp/e297393725b6499f3d584ab7a790f51b/5C23A090/t51.2885-15/sh0.08/e35/s640x640/36927581_494161214367478_6725525121718550528_n.jpg",
"https://scontent.cdninstagram.com/vp/edee34957a5704209ff0b3ecc978c352/5C34A23E/t51.2885-15/sh0.08/e35/s640x640/36807651_423060241435337_3545566962513870848_n.jpg",
"https://scontent.cdninstagram.com/vp/a9f9ec089a789396bf490c9f06800cbf/5C32D51F/t51.2885-15/sh0.08/e35/s640x640/36979130_508116589620849_7590423061438922752_n.jpg",
"https://scontent.cdninstagram.com/vp/ad72c1d43c0f209daf131f9600feb374/5C2C945D/t51.2885-15/sh0.08/e35/s640x640/37144982_2073772899609111_5129036218167721984_n.jpg",
"https://scontent.cdninstagram.com/vp/7085de2fa8e7776671977f916b701f43/5C14A830/t51.2885-15/sh0.08/e35/s640x640/36806411_178896509647898_5392398080840564736_n.jpg",
"https://scontent.cdninstagram.com/vp/265be3af64ee56782faea9ae3d747adc/5C1CA800/t51.2885-15/sh0.08/e35/s640x640/36865077_631976460494349_6668520262771671040_n.jpg",
"https://scontent.cdninstagram.com/vp/bded4393bbddf47c411d0487bccdfadb/5C18FD7D/t51.2885-15/sh0.08/e35/s640x640/37023301_833037036887013_7508325616274374656_n.jpg",
"https://scontent.cdninstagram.com/vp/1144b70df020e2db10c367e049dd9822/5C2C3C60/t51.2885-15/sh0.08/e35/s640x640/36828776_291365704932715_2351678981800984576_n.jpg",
"https://scontent.cdninstagram.com/vp/41cefc2b0d1d225d1cd736a9de4eea7f/5C14DEB2/t51.2885-15/sh0.08/e35/s640x640/37235666_232187550756757_807694580269973504_n.jpg",
"https://scontent.cdninstagram.com/vp/d9574be54c4d788a645dfd0985b43bfa/5C313FA9/t51.2885-15/sh0.08/e35/s640x640/36940680_510671596033335_8696141462418489344_n.jpg",
"https://scontent.cdninstagram.com/vp/bb570b1d38b549de4cfa8592e2fd3e8b/5C2FC650/t51.2885-15/sh0.08/e35/s640x640/36942800_622671888110333_1778878151519109120_n.jpg",
"https://scontent.cdninstagram.com/vp/c1db8ef6a230574b9acf4fb7cd50db98/5C20AD9A/t51.2885-15/sh0.08/e35/s640x640/36790982_1915004795464963_5659634351906750464_n.jpg",
"https://scontent.cdninstagram.com/vp/07faa90785a57bec6facb5e24f92edbc/5C2FF127/t51.2885-15/sh0.08/e35/s640x640/36948510_269986123755867_7363186791462993920_n.jpg",
"https://scontent.cdninstagram.com/vp/547264af2439294a07ad0d45d4929bd7/5C29D82A/t51.2885-15/sh0.08/e35/s640x640/36556930_252621272136913_4419896285344038912_n.jpg",
"https://scontent.cdninstagram.com/vp/618b2804d1b4e874936f757b92a655ff/5C1C5EDC/t51.2885-15/sh0.08/e35/s640x640/36710950_291752064900996_6239639087884533760_n.jpg",
"https://scontent.cdninstagram.com/vp/acca9ac9a83625623dd7a3f10c39b6e4/5C219BD5/t51.2885-15/sh0.08/e35/s640x640/36985449_203419660367942_415145796460085248_n.jpg",
"https://scontent.cdninstagram.com/vp/24d2deaf27a1ae4be685fb72adc4eb96/5C2CDDD1/t51.2885-15/sh0.08/e35/s640x640/36742564_192058834824233_3268491179070586880_n.jpg",
"https://scontent.cdninstagram.com/vp/5d4feb8658ac6db851b7d36ba05b9eb5/5C265E85/t51.2885-15/sh0.08/e35/s640x640/36784620_2074141452912673_8121556425412444160_n.jpg",
"https://scontent.cdninstagram.com/vp/75d4c43b4ceae891421d19c8dccf68bb/5C1ABD3A/t51.2885-15/sh0.08/e35/p640x640/30590800_199227584199081_3148479837086154752_n.jpg",
"https://scontent.cdninstagram.com/vp/44ad69bf09e96d2654653271860b1989/5C1F2D80/t51.2885-15/sh0.08/e35/p640x640/30592470_2018322261761779_8815353184571621376_n.jpg",
"https://scontent.cdninstagram.com/vp/a9867df592f3ca62d678d3690b5715d9/5C2434B6/t51.2885-15/sh0.08/e35/p640x640/30949074_235502763853733_7425615927816749056_n.jpg",
"https://scontent.cdninstagram.com/vp/0697e3285608a7728b8c3908d4a7e59b/5C39A8EF/t51.2885-15/sh0.08/e35/p640x640/31150196_553996291654018_289122758686670848_n.jpg",
};
CustomAppBarClass newbar = new CustomAppBarClass(this);
newbar.SetpUpBar();
GridView gridLayout = findViewById(R.id.ig_grid);
gridLayout.setAdapter(new MediaPageAdapter(this,urls));
}
}

View File

@@ -0,0 +1,129 @@
package com.example.h_mal.alameera;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache;
import com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator;
import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.nostra13.universalimageloader.core.decode.BaseImageDecoder;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.nostra13.universalimageloader.utils.StorageUtils;
import java.io.File;
/**
* Created by h_mal on 12/09/2018.
*/
public class MediaPageAdapter extends BaseAdapter {
private Activity activity;
private String data[];
private LayoutInflater inflater=null;
public ImageLoader imageLoader;
DisplayImageOptions options;
public MediaPageAdapter(Activity activity, String[] data) {
this.activity = activity;
this.data = data;
inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
File cacheDir = StorageUtils.getOwnCacheDirectory(activity, "MyFolderCache");
// Get singletone instance of ImageLoader
imageLoader = ImageLoader.getInstance();
// Create configuration for ImageLoader (all options are optional)
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(activity).memoryCacheExtraOptions(480, 800) // default = device screen dimensions
.diskCacheExtraOptions(480, 800, null)
.threadPriority(Thread.NORM_PRIORITY - 2) // default
.tasksProcessingOrder(QueueProcessingType.FIFO) // default
.denyCacheImageMultipleSizesInMemory()
.memoryCache(new LruMemoryCache(2 * 1024 * 1024))
.memoryCacheSize(2 * 1024 * 1024)
.memoryCacheSizePercentage(13) // default
.diskCache(new UnlimitedDiskCache(cacheDir)) // default
.diskCacheSize(50 * 1024 * 1024)
.diskCacheFileCount(100)
.diskCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
.imageDownloader(new BaseImageDownloader(activity)) // default
.imageDecoder(new BaseImageDecoder(true)) // default
.defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
.writeDebugLogs().build();
// You can pass your own memory cache implementation
// Initialize ImageLoader with created configuration. Do it once.
imageLoader.init(config);
//imageLoader.init(ImageLoaderConfiguration.createDefault(a));
// imageLoader=new ImageLoader(activity.getApplicationContext());
options = new DisplayImageOptions.Builder()
.displayer(new RoundedBitmapDisplayer(20))
.build();
}
@Override
public int getCount() {
return data.length;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View listItemView = convertView;
if (listItemView == null) {
listItemView = LayoutInflater.from(activity).inflate(
R.layout.list_item_insta, parent, false);
}
ImageView img = listItemView.findViewById(R.id.igImg);
ProgressBar pg = listItemView.findViewById(R.id.progressBar);
display(img, data[position], pg);
return listItemView;
}
public void display(ImageView img, String url, final ProgressBar spinner)
{
imageLoader.displayImage(url, img, options, new ImageLoadingListener() {
@Override
public void onLoadingStarted(String imageUri, View view) {
spinner.setVisibility(View.VISIBLE);
}
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
spinner.setVisibility(View.GONE);
}
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
spinner.setVisibility(View.GONE);
}
@Override
public void onLoadingCancelled(String imageUri, View view) {
}
});
}
}

View File

@@ -0,0 +1,48 @@
package com.example.h_mal.alameera;
import com.google.firebase.database.IgnoreExtraProperties;
/**
* Created by h_mal on 08/09/2018.
*/
@IgnoreExtraProperties
public class Product {
public String productDescription;
public String productImage;
public String productName;
public float productPrice;
public int productQuantity;
public Product() {
}
public Product(String productDescription, String productImage, String productName, float productPrice, int productQuantity) {
this.productDescription = productDescription;
this.productImage = productImage;
this.productName = productName;
this.productPrice = productPrice;
this.productQuantity = productQuantity;
}
public String getProductDescription() {
return productDescription;
}
public String getProductImage() {
return productImage;
}
public String getProductName() {
return productName;
}
public float getProductPrice() {
return productPrice;
}
public int getProductQuantity() {
return productQuantity;
}
}

View File

@@ -0,0 +1,78 @@
package com.example.h_mal.alameera;
import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.squareup.picasso.Callback;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
/**
* Created by h_mal on 08/09/2018.
*/
public class ProductsAdapter extends ArrayAdapter<Product>{
private ProgressBar pb;
private int count = 0;
public ProductsAdapter(@NonNull Activity context, @NonNull ArrayList<Product> objects, ProgressBar pb) {
super(context, 0, objects);
this.pb = pb;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View listItemView = convertView;
if (listItemView == null) {
listItemView = LayoutInflater.from(getContext()).inflate(
R.layout.list_item_products, parent, false);
}
Product currentProduct = getItem(position);
ImageView productImageView = listItemView.findViewById(R.id.prodImageView);
TextView productName = listItemView.findViewById(R.id.prodNameTextView);
TextView productDesc = listItemView.findViewById(R.id.proDescTextView2);
TextView productPrice = listItemView.findViewById(R.id.prodPriceTextView3);
Picasso.with(getContext())
.load(currentProduct.getProductImage())
.placeholder(R.drawable.a)
.into(productImageView, new Callback() {
@Override
public void onSuccess() {
count = count +1;
if (count >= 1){
pb.setVisibility(View.GONE);
}
}
@Override
public void onError() {
}
});
productName.setText(currentProduct.getProductName());
productDesc.setText(currentProduct.getProductDescription());
productPrice.setText(String.valueOf(currentProduct.getProductPrice()));
return listItemView;
}
}

View File

@@ -0,0 +1,20 @@
package com.example.h_mal.alameera;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
/**
* Created by h_mal on 09/09/2018.
*/
public class ServiceActivity extends AppCompatActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_service);
}
}

View File

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
</vector>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

View File

@@ -0,0 +1,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#009688"
android:endColor="#00695C"
android:startColor="#4DB6AC"
android:type="linear" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.example.h_mal.alameera.BasketActivity">
<include layout="@layout/custom_appbar" />
<LinearLayout
android:id="@+id/emptyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="20dp"
android:text="Cart Is Empty"
android:textSize="20sp" />
<Button
android:id="@+id/emptyCart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#484950"
android:padding="10dp"
android:text="Continue Shopping"
android:textColor="#ffffff" />
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.example.h_mal.alameera.LoginActivity">
<include
layout="@layout/custom_appbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="12dp"
android:layout_centerInParent="true"
android:id="@+id/linearLayout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Email Address:" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/email"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Password:" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/password"/>
</LinearLayout>
<Button
android:id="@+id/login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/linearLayout"
android:layout_marginRight="12dp"
android:text="Login" />
</RelativeLayout>

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.example.h_mal.alameera.MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
layout="@layout/custom_appbar" />
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/navigation"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.PopupOverlay"
android:layout_below="@id/appbar">
<!--<android.support.v7.widget.Toolbar-->
<!--android:id="@+id/toolbar"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="?attr/actionBarSize"-->
<!--android:background="?attr/colorPrimary"-->
<!--app:popupTheme="@style/AppTheme.PopupOverlay">-->
<!--<RelativeLayout-->
<!--android:id="@+id/basket"-->
<!--android:layout_width="60dp"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_gravity="end"-->
<!--android:layout_marginEnd="20dp"-->
<!--android:layout_marginRight="20dp"-->
<!--android:background="@drawable/camera">-->
<!--<TextView-->
<!--android:id="@+id/backet_quantity"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_centerHorizontal="true"-->
<!--android:layout_centerVertical="true"-->
<!--android:gravity="fill_vertical"-->
<!--android:paddingTop="8dp"-->
<!--android:text="0"-->
<!--android:textSize="22sp" />-->
<!--</RelativeLayout>-->
<!--</android.support.v7.widget.Toolbar>-->
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</android.support.v4.view.ViewPager>
</android.support.design.widget.CoordinatorLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/colorPrimary"
android:layout_above="@id/navigation"/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
app:labelVisibilityMode="labeled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:background="?android:attr/windowBackground"
app:menu="@menu/navigation" />
</RelativeLayout>
<android.support.design.widget.NavigationView
android:id="@+id/drawer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:menu="@menu/drawer_menu"
app:headerLayout="@layout/nav_header_main"
android:layout_gravity="start"
android:theme="@style/Base.Widget.AppCompat.PopupWindow">
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>

View File

@@ -0,0 +1,23 @@
<?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"
tools:context="com.example.h_mal.alameera.MediaActivity">
<include
layout="@layout/custom_appbar" />
<GridView
android:id="@+id/ig_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:numColumns="3"
android:stretchMode="columnWidth">
</GridView>
</LinearLayout>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
tools:context="com.example.h_mal.alameera.MediaActivity">
<!--<include-->
<!--android:id="@+id/thisappbar"-->
<!--layout="@layout/custom_appbar" />-->
<!--<GridView-->
<!--android:layout_below="@id/thisappbar"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:id="@+id/ig_grid"-->
<!--android:gravity="center"-->
<!--android:numColumns="3"-->
<!--android:stretchMode="columnWidth">-->
<!--</GridView>-->
</android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.h_mal.alameera.SocialActivity"
tools:showIn="@layout/activity_social">
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.ActionBarContainer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="#f9f9f9">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="#f9f9f9"
android:orientation="horizontal">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
android:shadowColor="#a69393"
android:shadowDy="5"
android:shadowRadius="5"/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/back_icon"
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:padding="6dp"
android:src="?android:attr/homeAsUpIndicator"
android:tint="#737373" />
<ImageView
android:id="@+id/action_bar_profile"
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:background="@android:color/transparent"
android:padding="15dp"
android:tint="#737373"
app:srcCompat="@drawable/user" />
</FrameLayout>
<ImageView
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:layout_centerInParent="true"
android:tint="#737373"
app:srcCompat="@drawable/a" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageButton
android:id="@+id/action_bar_basket"
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:layout_gravity="center_vertical"
android:background="@android:color/transparent"
android:paddingBottom="12dp"
android:paddingTop="10dp"
android:scaleType="fitCenter"
android:tint="#737373"
app:srcCompat="@drawable/basket" />
<ImageButton
android:id="@+id/action_bar_social"
android:layout_width="wrap_content"
android:layout_height="?android:attr/actionBarSize"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_gravity="center_vertical"
android:layout_marginEnd="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/transparent"
android:tint="#737373"
app:srcCompat="@drawable/instagram" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.ActionBarContainer>

View File

@@ -0,0 +1,22 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.h_mal.alameera.FragmentFive">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="20dp"
android:layout_centerInParent="true">
<GridView
android:id="@+id/loyalty_card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:numColumns="4"
android:stretchMode="columnWidth">
</GridView>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@@ -0,0 +1,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.h_mal.alameera.FragmentFour">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/listViewServices">
</ListView>
</LinearLayout>

View File

@@ -0,0 +1,15 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.h_mal.alameera.FragmentHome">
<!-- TODO: Update blank fragment layout -->
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/listView">
</ListView>
</FrameLayout>

View File

@@ -0,0 +1,29 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.h_mal.alameera.FragmentThree"
android:orientation="vertical">
<SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:id="@+id/search_bar">
</SearchView>
<ProgressBar
android:id="@+id/fragProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/listViewProducts"
android:layout_below="@id/search_bar">
</ListView>
</RelativeLayout>

View File

@@ -0,0 +1,32 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.h_mal.alameera.FragmentTwo">
<com.alamkanak.weekview.WeekView
android:id="@+id/weekView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:eventTextColor="@android:color/white"
app:textSize="12sp"
app:hourHeight="60dp"
app:headerColumnPadding="8dp"
app:headerColumnTextColor="#8f000000"
app:headerRowPadding="12dp"
app:columnGap="8dp"
app:noOfVisibleDays="3"
app:headerRowBackgroundColor="#ffefefef"
app:dayBackgroundColor="#05000000"
app:todayBackgroundColor="@color/colorPrimary"
app:headerColumnBackground="#ffffffff"/>
<!--<ListView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:id="@+id/listViewBookings">-->
<!--</ListView>-->
</FrameLayout>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/home_item_imageView"
android:layout_width="match_parent"
android:layout_height="200dp"
android:animationCache="false"
android:layout_marginBottom="6dp"
android:layout_marginEnd="12dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:scrollingCache="false" />
<TextView
android:id="@+id/home_item_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginLeft="26dp"
android:layout_marginStart="26dp"
android:text="Hammam Bath"
android:textSize="45sp" />
</RelativeLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp">
<ImageView
android:id="@+id/igImg"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="centerCrop"
app:srcCompat="@color/common_google_signin_btn_text_dark_disabled" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"/>
</RelativeLayout>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/a" />
<ImageView
android:id="@+id/cross"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@android:drawable/ic_delete" />
</RelativeLayout>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/prodImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
app:srcCompat="@drawable/user" />
<TextView
android:id="@+id/prodNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/prodImageView"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Product Name"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/proDescTextView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/prodNameTextView"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:text="Long line describing product" />
<TextView
android:id="@+id/prodPriceTextView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/proDescTextView2"
android:layout_centerHorizontal="true"
android:layout_marginBottom="33dp"
android:layout_marginTop="4dp"
android:text="£00.00" />
</RelativeLayout>

View File

@@ -0,0 +1,35 @@
<?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"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/side_nav_bar"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_launcher_round" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Android Studio"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="android.studio@android.com" />
</LinearLayout>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:id="@+id/user_group"
android:checkableBehavior="single">
<item
android:id="@+id/drawer_profile"
android:title="My Profile" />
<item
android:id="@+id/drawer_payments"
android:title="Payments" />
</group>
<group android:id="@+id/about_group"
android:checkableBehavior="single">
<item
android:id="@+id/drawer_about_us"
android:title="About us" />
<item
android:id="@+id/drawer_contact_us"
android:title="Contact us" />
</group>
<item
android:id="@+id/drawer_settings"
android:title="Settings" />
</menu>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home" />
<item
android:id="@+id/navigation_bookings"
android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_bookings"/>
<item
android:id="@+id/navigation_products"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_products" />
<item
android:id="@+id/navigation_services"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_services" />
<item
android:id="@+id/navigation_loyalty_card"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_loyalty_card" />
</menu>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#eda788</color>
<color name="colorPrimaryDark">#f59266</color>
<color name="colorAccent">#ff4081</color>
</resources>

View File

@@ -0,0 +1,10 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="appbar_padding_top">8dp</dimen>
<dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">176dp</dimen>
</resources>

View File

@@ -0,0 +1,17 @@
<resources>
<string name="app_name">Alameera</string>
<string name="title_home">Home</string>
<string name="title_bookings">Bookings</string>
<string name="title_products">Products</string>
<string name="title_services">Services</string>
<string name="title_loyalty_card">Loyalty</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title_activity_social_activty">SocialActivty</string>
</resources>

View File

@@ -0,0 +1,32 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">#dfdede</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="CustomTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="actionButtonStyle">@style/MyActionButtonStyle</item>
</style>
<style name="MyActionButtonStyle" parent="Widget.Design.AppBarLayout">
<item name="android:minWidth">28dip</item>
</style>
<style name="AppTheme.NoActionBar.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>

View File

@@ -0,0 +1,17 @@
package com.example.h_mal.alameera;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}

28
build.gradle Normal file
View File

@@ -0,0 +1,28 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

17
gradle.properties Normal file
View File

@@ -0,0 +1,17 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Thu Sep 20 21:03:48 AEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

160
gradlew vendored Normal file
View File

@@ -0,0 +1,160 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

1
settings.gradle Normal file
View File

@@ -0,0 +1 @@
include ':app'