-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created the project - add activities and fragments - added room and r…
…epo class - set up the interactions between activites and frgaments
- Loading branch information
0 parents
commit c0c639e
Showing
89 changed files
with
3,677 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
defaultConfig { | ||
applicationId "ml.medyas.bakingapp" | ||
minSdkVersion 16 | ||
targetSdkVersion 28 | ||
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(dir: 'libs', include: ['*.jar']) | ||
implementation 'com.android.support:appcompat-v7:28.0.0' | ||
implementation 'com.android.support:recyclerview-v7:28.0.0' | ||
implementation 'com.android.support:support-v4:28.0.0' | ||
implementation 'com.android.support:design:28.0.0' | ||
|
||
implementation 'com.android.support.constraint:constraint-layout:1.1.3' | ||
|
||
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' | ||
|
||
// Room components | ||
implementation "android.arch.persistence.room:runtime:1.1.1" | ||
annotationProcessor "android.arch.persistence.room:compiler:1.1.1" | ||
androidTestImplementation "android.arch.persistence.room:testing:1.1.1" | ||
|
||
// Lifecycle components | ||
implementation "android.arch.lifecycle:extensions:1.1.1" | ||
annotationProcessor "android.arch.lifecycle:compiler:1.1.1" | ||
|
||
implementation 'com.google.android.exoplayer:exoplayer:2.8.4' | ||
|
||
implementation 'com.squareup.picasso:picasso:2.71828' | ||
|
||
implementation 'com.jakewharton:butterknife:8.8.1' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' | ||
|
||
implementation 'com.google.code.gson:gson:2.8.5' | ||
|
||
implementation 'com.github.kittinunf.fuel:fuel:1.15.0' //for JVM | ||
implementation 'com.github.kittinunf.fuel:fuel-android:1.15.0' //for Android | ||
|
||
implementation 'com.github.florent37:shapeofview:1.3.2' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
26 changes: 26 additions & 0 deletions
26
app/src/androidTest/java/ml/medyas/bakingapp/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package ml.medyas.bakingapp; | ||
|
||
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() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("ml.medyas.bakingapp", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="ml.medyas.bakingapp"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
|
||
<application | ||
android:allowBackup="false" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppNoActionBarTheme" | ||
tools:ignore="GoogleAppIndexingWarning"> | ||
|
||
<activity android:name=".Activities.RecipeActivity" > | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity android:name=".Activities.RecipeDetailActivity" | ||
android:parentActivityName=".Activities.RecipeActivity"/> | ||
|
||
<activity android:name=".Activities.RecipeDetailViewActivity" | ||
android:parentActivityName=".Activities.RecipeDetailActivity"/> | ||
|
||
<activity android:name=".Activities.SettingsActivity" /> | ||
|
||
<activity android:name=".Activities.AboutActivity"></activity> | ||
</application> | ||
|
||
</manifest> |
60 changes: 60 additions & 0 deletions
60
app/src/main/java/ml/medyas/bakingapp/Activities/AboutActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package ml.medyas.bakingapp.Activities; | ||
|
||
import android.content.Intent; | ||
import android.os.Build; | ||
import android.support.design.button.MaterialButton; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.support.v7.widget.Toolbar; | ||
import android.view.animation.AccelerateDecelerateInterpolator; | ||
|
||
import butterknife.BindView; | ||
import butterknife.ButterKnife; | ||
import butterknife.OnClick; | ||
import ml.medyas.bakingapp.Classes.NavigationIconClickListener; | ||
import ml.medyas.bakingapp.R; | ||
|
||
import static ml.medyas.bakingapp.Classes.UtilsClass.getNavigationIconView; | ||
|
||
public class AboutActivity extends AppCompatActivity { | ||
@BindView(R.id.toolbar) Toolbar toolbar; | ||
|
||
NavigationIconClickListener nav; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
ButterKnife.bind(this); | ||
|
||
setSupportActionBar(toolbar); | ||
getSupportActionBar().setTitle("About"); | ||
nav = new NavigationIconClickListener(this, | ||
findViewById(R.id.product_grid), | ||
new AccelerateDecelerateInterpolator(), | ||
getResources().getDrawable(R.drawable.ic_menu_black_24dp), | ||
getResources().getDrawable(R.drawable.ic_close_black_24dp)); | ||
toolbar.setNavigationOnClickListener(nav); | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | ||
findViewById(R.id.product_grid).setBackground(getDrawable(R.drawable.background_shape)); | ||
} | ||
} | ||
|
||
@OnClick({R.id.nav_recipe_activity, R.id.nav_settings_activity, R.id.nav_about_activity}) | ||
public void navMenuClicked(MaterialButton btn) { | ||
int id = btn.getId(); | ||
switch (id) { | ||
case R.id.nav_recipe_activity: | ||
startActivity(new Intent(getApplicationContext(), RecipeActivity.class)); | ||
break; | ||
case R.id.nav_settings_activity: | ||
startActivity(new Intent(getApplicationContext(), SettingsActivity.class)); | ||
break; | ||
case R.id.nav_about_activity: | ||
startActivity(new Intent(getApplicationContext(), SettingsActivity.class)); | ||
break; | ||
default: | ||
return; | ||
} | ||
} | ||
} |
Oops, something went wrong.