Updates to the app to produce screenshots for portfolio
1
app/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/build
|
||||
/google-services.json
|
||||
@@ -23,13 +23,13 @@ android {
|
||||
|
||||
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.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'com.android.support:support-vector-drawable:28.0.0'
|
||||
implementation 'com.android.support:support-v4:28.0.0'
|
||||
implementation 'com.github.alamkanak:android-week-view:1.2.6'
|
||||
implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
|
||||
implementation 'com.android.support:cardview-v7:28.0.0'
|
||||
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'
|
||||
@@ -38,7 +38,8 @@ dependencies {
|
||||
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'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
}
|
||||
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<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"
|
||||
@@ -12,22 +13,33 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
android:name=".SplashscreenActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/FullscreenTheme">
|
||||
<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
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
|
||||
</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>
|
||||
@@ -31,7 +31,7 @@ public class FragmentHome extends Fragment{
|
||||
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.massage,"Hammam Bath"));
|
||||
items.add(new HomeScreenItems(R.drawable.earring,"Earrings"));
|
||||
items.add(new HomeScreenItems(R.drawable.hairmist,"Hair Mist"));
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.h_mal.alameera.R;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -37,8 +38,8 @@ public class HomeScreenItemAdapter extends ArrayAdapter<HomeScreenItems>{
|
||||
HomeScreenItems currentItem = getItem(position);
|
||||
|
||||
ImageView homeScreenImageView = listItemView.findViewById(R.id.home_item_imageView);
|
||||
homeScreenImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
homeScreenImageView.setImageResource(currentItem.getImg());
|
||||
|
||||
Picasso.with(getContext()).load(currentItem.getImg()).placeholder(R.drawable.alogo2).into(homeScreenImageView);
|
||||
|
||||
TextView homeScreenTextView = listItemView.findViewById(R.id.home_item_textView);
|
||||
homeScreenTextView.setText(currentItem.getTitle());
|
||||
|
||||
@@ -66,38 +66,4 @@ public class FragmentTwo extends Fragment {
|
||||
|
||||
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());
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -104,10 +105,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
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");
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.example.h_mal.alameera;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
/**
|
||||
* An example full-screen activity that shows and hides the system UI (i.e.
|
||||
* status bar and navigation/system bar) with user interaction.
|
||||
*/
|
||||
public class SplashscreenActivity extends AppCompatActivity {
|
||||
|
||||
// Splash screen timer
|
||||
private static int SPLASH_TIME_OUT = 2000;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splashscreen);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
|
||||
/*
|
||||
* Showing splash screen with a timer. This will be useful when you
|
||||
* want to show case your app logo / company
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// This method will be executed once the timer is over
|
||||
// Start your app main activity
|
||||
Intent i = new Intent(SplashscreenActivity.this, MainActivity.class);
|
||||
startActivity(i);
|
||||
// close this activity
|
||||
finish();
|
||||
|
||||
|
||||
}
|
||||
}, SPLASH_TIME_OUT);
|
||||
}
|
||||
}
|
||||
BIN
app/src/main/res/drawable-hdpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 715 KiB |
BIN
app/src/main/res/drawable-ldpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
app/src/main/res/drawable-mdpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 352 KiB |
BIN
app/src/main/res/drawable-xhdpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
app/src/main/res/drawable-xxhdpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
app/src/main/res/drawable-xxxhdpi/splashscreen.png
Normal file
|
After Width: | Height: | Size: 3.7 MiB |
BIN
app/src/main/res/drawable/alogo.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
app/src/main/res/drawable/alogo2.png
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
app/src/main/res/drawable/massage.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
app/src/main/res/drawable/splashscreen.jpg
Normal file
|
After Width: | Height: | Size: 602 KiB |
@@ -82,13 +82,16 @@
|
||||
</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: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"
|
||||
tools:layout_gravity="centre"
|
||||
android:theme="@style/Base.Widget.AppCompat.PopupWindow">
|
||||
</android.support.design.widget.NavigationView>
|
||||
|
||||
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
16
app/src/main/res/layout/activity_splashscreen.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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=".SplashscreenActivity">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
app:srcCompat="@drawable/splashscreen" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -47,9 +47,10 @@
|
||||
<ImageView
|
||||
android:layout_width="?android:attr/actionBarSize"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:layout_centerInParent="true"
|
||||
android:tint="#737373"
|
||||
app:srcCompat="@drawable/a" />
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="-1dp"
|
||||
android:padding="3dp"
|
||||
app:srcCompat="@drawable/alogo2" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<?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">
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/home_item_imageView"
|
||||
tools:src="@drawable/massage"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:animationCache="false"
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/a" />
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/alogo2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cross"
|
||||
|
||||
12
app/src/main/res/values/attrs.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<resources>
|
||||
|
||||
<!-- Declare custom theme attributes that allow changing which styles are
|
||||
used for button bars depending on the API level.
|
||||
?android:attr/buttonBarStyle is new as of API 11 so this is
|
||||
necessary to support previous API levels. -->
|
||||
<declare-styleable name="ButtonBarContainerTheme">
|
||||
<attr name="metaButtonBarStyle" format="reference" />
|
||||
<attr name="metaButtonBarButtonStyle" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -3,4 +3,6 @@
|
||||
<color name="colorPrimary">#eda788</color>
|
||||
<color name="colorPrimaryDark">#f59266</color>
|
||||
<color name="colorAccent">#ff4081</color>
|
||||
|
||||
<color name="black_overlay">#66000000</color>
|
||||
</resources>
|
||||
|
||||
@@ -14,4 +14,8 @@
|
||||
|
||||
|
||||
<string name="title_activity_social_activty">SocialActivty</string>
|
||||
|
||||
<string name="title_activity_splashscreen">SplashscreenActivity</string>
|
||||
<string name="dummy_button">Dummy Button</string>
|
||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||
</resources>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="CustomTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="actionButtonStyle">@style/MyActionButtonStyle</item>
|
||||
@@ -29,4 +29,17 @@
|
||||
|
||||
<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="FullscreenTheme" parent="AppTheme.NoActionBar">
|
||||
<item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowBackground">@null</item>
|
||||
<item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>
|
||||
<item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">
|
||||
<item name="android:background">@color/black_overlay</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||