Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ dependencies {
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'com.github.mancj:MaterialSearchBar:0.7.6'
implementation 'com.codemybrainsout.onboarding:onboarder:1.0.4'
}
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
android:authorities="com.example.gerin.inventory"
android:exported="false" />

<activity android:name=".YourActivity">

</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.gerin.inventory;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
Expand All @@ -13,6 +14,7 @@
public class MainActivity extends AppCompatActivity {

private static int SPLASH_TIME_OUT = 4000;
public static final String MY_PREFS_NAME = "MyPrefsFile";

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -23,6 +25,10 @@ protected void onCreate(Bundle savedInstanceState) {
TextView name = (TextView) findViewById(R.id.splash_screen_name);


SharedPreferences.Editor editor = getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE).edit();
editor.putBoolean("firstTime", false);
editor.apply();

// create animations from resources
Animation fromBottom = AnimationUtils.loadAnimation(this,R.anim.from_bottom);
Animation fadeIn = AnimationUtils.loadAnimation(this,R.anim.fade_in);
Expand Down
87 changes: 87 additions & 0 deletions app/src/main/java/com/example/gerin/inventory/YourActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package com.example.gerin.inventory;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.widget.Toast;

import com.codemybrainsout.onboarder.AhoyOnboarderActivity;
import com.codemybrainsout.onboarder.AhoyOnboarderCard;

import java.util.ArrayList;
import java.util.List;

public class YourActivity extends AhoyOnboarderActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

AhoyOnboarderCard ahoyOnboarderCard1 = new AhoyOnboarderCard("Welcome to your", "Inventory", R.drawable.intro2);
AhoyOnboarderCard ahoyOnboarderCard2 = new AhoyOnboarderCard("ADD", "Keep track of your growing inventory by adding items and details you care about.", R.drawable.add_intro);
AhoyOnboarderCard ahoyOnboarderCard3 = new AhoyOnboarderCard("EDIT", "Always keep your inventory up to date by editing your items.", R.drawable.edit_intro);
AhoyOnboarderCard ahoyOnboarderCard4 = new AhoyOnboarderCard("SEARCH", "Find your items easily using the search bar.", R.drawable.search_intro);
AhoyOnboarderCard ahoyOnboarderCard5 = new AhoyOnboarderCard("SORT", "Organize you items to find them at a glance.", R.drawable.sort_intro);
AhoyOnboarderCard ahoyOnboarderCard6 = new AhoyOnboarderCard("VIEW", "Click on an item to see a more detailed description.", R.drawable.view_intro);


ahoyOnboarderCard1.setBackgroundColor(R.color.black_transparent);
ahoyOnboarderCard2.setBackgroundColor(R.color.black_transparent);
ahoyOnboarderCard3.setBackgroundColor(R.color.black_transparent);
ahoyOnboarderCard4.setBackgroundColor(R.color.black_transparent);
ahoyOnboarderCard5.setBackgroundColor(R.color.black_transparent);
ahoyOnboarderCard6.setBackgroundColor(R.color.black_transparent);

List<AhoyOnboarderCard> pages = new ArrayList<>();

pages.add(ahoyOnboarderCard1);
pages.add(ahoyOnboarderCard2);
pages.add(ahoyOnboarderCard3);
pages.add(ahoyOnboarderCard4);
pages.add(ahoyOnboarderCard5);
pages.add(ahoyOnboarderCard6);


for (AhoyOnboarderCard page : pages) {
page.setTitleColor(R.color.white);
page.setDescriptionColor(R.color.grey_200);
//page.setDescriptionTextSize(dpToPixels(8, this));

}

ahoyOnboarderCard1.setTitleTextSize(dpToPixels(8, this));
ahoyOnboarderCard1.setDescriptionTextSize(dpToPixels(8, this));
ahoyOnboarderCard1.setDescriptionColor(R.color.white);

ahoyOnboarderCard1.setIconLayoutParams(600, 600, 1, 1, 1, 1);
ahoyOnboarderCard2.setIconLayoutParams(1000, 800, 1, 1, 1, 1);
ahoyOnboarderCard3.setIconLayoutParams(1000, 500, 1, 1, 1, 100);
ahoyOnboarderCard4.setIconLayoutParams(1000, 500, 1, 1, 1, 100);
ahoyOnboarderCard5.setIconLayoutParams(1000, 500, 1, 1, 1, 100);
ahoyOnboarderCard6.setIconLayoutParams(600, 600, 1, 1, 1, 1);


setFinishButtonTitle("Let's Get Started");
showNavigationControls(true);
setGradientBackground();

//set the button style you created
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
setFinishButtonDrawableStyle(ContextCompat.getDrawable(this, R.drawable.rounded_button));
}

// Typeface face = Typeface.createFromAsset(getAssets(), "fonts/Roboto-Light.ttf");
// setFont(face);

setOnboardPages(pages);
}

@Override
public void onFinishButtonPressed() {
Intent catalogIntent = new Intent(YourActivity.this, CatalogActivity.class);
startActivity(catalogIntent);
finish();
}
}
Binary file added app/src/main/res/drawable/add_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/edit_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/intro1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/intro2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/search_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/sort_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/view_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions app/src/main/res/layout/activity_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/dollarSign" />
>

<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/layout/activity_your.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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"
tools:context=".YourActivity">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="hint_item_name">Name</string>
<string name="hint_item_quantity">Quantity</string>
<string name="action_save">Save</string>
<string name="hint_item_price">Price</string>
<string name="hint_item_price">$ Price</string>
<string name="category_description">Description</string>
<string name="hint_item_description">Describe the product</string>
<string name="dollarSign">$</string>
Expand Down