Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Merge update-design
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkNjunge committed Jul 6, 2019
2 parents 1e1f986 + 5d1fca5 commit 6f41914
Show file tree
Hide file tree
Showing 61 changed files with 60 additions and 449 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ android {
debug {
ext.alwaysUpdateBuildId = false
ext.enableCrashlytics = false
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.filters.LargeTest
import androidx.test.rule.ActivityTestRule
import androidx.test.runner.AndroidJUnit4
import androidx.recyclerview.widget.RecyclerView
import com.marknkamau.justjava.R
import com.marknjunge.core.data.local.DrinksProvider
import com.marknkamau.justjava.R
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand Down
Binary file added app/src/debug/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions app/src/debug/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="109.81469"
android:viewportHeight="109.81469">
<group android:translateX="3.8435142"
android:translateY="3.8435142">
<group android:translateX="27.06383"
android:translateY="27.06383">
<path
android:pathData="M39.8,8.6h-1.4H9.6H8.2V5.8h1.9h27.8h1.9V8.6zM36.2,18.7h-6.9c0,0 -0.3,-0.1 -0.5,-0.4c-0.4,-0.6 -0.8,-1.3 -1.7,-1.6c-0.2,0 -0.4,-0.1 -0.7,-0.1c-0.6,0 -1.1,0.2 -1.5,0.4c-0.3,0.1 -0.7,0.3 -0.9,0.3s-0.6,-0.1 -0.9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C41.8,4.2 41.4,3.8 40.8,3.8L40.8,3.8z"
android:fillColor="#FFFFFF"/>
</group>
</group>
</vector>
Binary file added app/src/debug/res/mipmap-hdpi/ic_launcher.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/debug/res/mipmap-mdpi/ic_launcher.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/debug/res/mipmap-xhdpi/ic_launcher.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/debug/res/mipmap-xxhdpi/ic_launcher.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/debug/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/debug/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#5C5C5C</color>
</resources>
4 changes: 4 additions & 0 deletions app/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">[D] JustJava</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/java/com/marknkamau/justjava/JustJavaApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import java.lang.Exception

@Suppress("unused")
class JustJavaApp : Application() {
private val authService: AuthService by inject()
private val userService: UserService by inject()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.marknkamau.justjava.ui

import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob

abstract class BasePresenter(mainDispatcher: CoroutineDispatcher) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package com.marknkamau.justjava.ui.drinkdetails

import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.animation.PropertyValuesHolder
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.TypedValue
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView {
presenter.getCatalogItems()
}

override fun displayCatalog(drinkList: MutableList<CoffeeDrink>) {
override fun displayCatalog(drinkList: List<CoffeeDrink>) {
catalogAdapter.setItems(drinkList)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.marknkamau.justjava.ui.main
import com.marknjunge.core.model.CoffeeDrink

internal interface MainView {
fun displayCatalog(drinkList: MutableList<CoffeeDrink>)
fun displayCatalog(drinkList: List<CoffeeDrink>)
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.marknkamau.justjava.ui.viewOrder

import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.appcompat.app.AlertDialog
import android.view.View
import android.widget.LinearLayout
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.recyclerview.widget.RecyclerView
import com.marknkamau.justjava.R
import com.marknkamau.justjava.data.local.PreferencesRepository
import com.marknjunge.core.model.Order
import com.marknjunge.core.model.OrderItem
import com.marknkamau.justjava.R
import com.marknkamau.justjava.data.local.PreferencesRepository
import com.marknkamau.justjava.data.network.MyFirebaseMessagingService
import com.marknkamau.justjava.utils.BaseRecyclerViewAdapter
import com.marknkamau.justjava.utils.formatForApp
Expand Down Expand Up @@ -46,6 +46,7 @@ class ViewOrderActivity : AppCompatActivity(), ViewOrderView {
private val broadcastManager by lazy { LocalBroadcastManager.getInstance(this) }
private val presenter: ViewOrderPresenter by inject { parametersOf(this) }

@SuppressLint("SetTextI18n")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_view_order)
Expand Down Expand Up @@ -93,7 +94,7 @@ class ViewOrderActivity : AppCompatActivity(), ViewOrderView {
if (order.orderId == orderId) {
Timber.d("The current order has been paid for!")
btnPayOrder.visibility = View.GONE
tvPaymentStatusOrder .text = "Paid"
tvPaymentStatusOrder .text = getString(R.string.paid)
displayMessage("Payment received!")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ fun AppCompatActivity.hideKeyboard() {
manager.hideSoftInputFromWindow(it.windowToken, 0)
}
}

fun AppCompatActivity.showKeyboard() {
val manager = this.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
manager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0)
}
3 changes: 1 addition & 2 deletions app/src/main/res/drawable/background_splash.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/colorPrimaryDark" />
<item
android:drawable="@drawable/ic_launcher_foreground"
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/drawable/fade.xml

This file was deleted.

19 changes: 0 additions & 19 deletions app/src/main/res/drawable/ic_profile.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_tick.xml

This file was deleted.

14 changes: 0 additions & 14 deletions app/src/main/res/drawable/ic_visibility.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/ic_visibility_off.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/drawable/input_field.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/large_button.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/large_button_disabled.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/topping_off.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/drawable/topping_on.xml

This file was deleted.

5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:contentDescription="@string/back_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back" />
Expand Down Expand Up @@ -93,7 +94,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:text="Mark Njung'e"
android:text="@string/developer_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView17" />

Expand All @@ -103,7 +104,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="contact@marknjunge.com"
android:text="@string/developer_contact"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView18" />

Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_cart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
android:layout_width="172dp"
android:layout_height="172dp"
android:layout_gravity="center"
android:contentDescription="@null"
app:srcCompat="@drawable/il_empty_cart" />

<TextView
Expand All @@ -46,7 +47,7 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context="com.marknkamau.justjava.ui.cart.CartActivity">

Expand All @@ -64,7 +65,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
tools:itemCount="2"
tools:listitem="@layout/item_cart" />
tools:listitem="@layout/item_order_item" />

<com.google.android.material.button.MaterialButton
android:id="@+id/btnClearCart"
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/res/layout/activity_libraries.xml

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_log_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btnLoginLogin"
style="@style/AppTheme.PrimaryButton"
style="@style/AppTheme.Button.FilledAccent"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginLeft="32dp"
Expand All @@ -90,7 +90,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btnSignUpLogin"
style="@style/AppTheme.SecondaryButton"
style="@style/AppTheme.Button.OutlinedAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_previous_orders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center"
android:contentDescription="@null"
app:srcCompat="@drawable/il_no_orders" />

<TextView
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center"
android:contentDescription="@null"
app:srcCompat="@drawable/il_no_orders" />

<TextView
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_sign_up.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilEmailAddressSignUp"
style="@style/AppTheme.InputField"
style="@style/AppTheme.InputField.OnDark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
Expand Down Expand Up @@ -163,7 +163,7 @@

<com.google.android.material.button.MaterialButton
android:id="@+id/btnSignupSignUp"
style="@style/AppTheme.PrimaryButton"
style="@style/AppTheme.Button.FilledAccent"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_marginStart="32dp"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/content_drink_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
style="@style/AppTheme.Text.14Accent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
app:layout_constraintBaseline_toBaselineOf="@+id/tvDrinkNameDetail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Ksh. 100" />

<TextView
Expand Down
Loading

0 comments on commit 6f41914

Please sign in to comment.