Aggiunta icona app.

Fixato bug su WaterfallToolbar.
This commit is contained in:
Giuseppe Scorrano 2019-02-06 17:18:19 +01:00
parent 80625d5bc1
commit ddd2d6b803
9 changed files with 2192 additions and 26 deletions

View File

@ -12,9 +12,9 @@
android:name=".MainApplication" android:name=".MainApplication"
android:allowBackup="true" android:allowBackup="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher" android:icon="@drawable/integry_round_icon"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@drawable/integry_round_icon"
android:supportsRtl="true" android:supportsRtl="true"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">

View File

@ -121,8 +121,7 @@ public class MainActivity extends AppCompatActivity
@Override @Override
public boolean onNavigationItemSelected(MenuItem item) { public boolean onNavigationItemSelected(MenuItem item) {
mBinding.appBarMain.waterfallToolbar.resetElevation(); mBinding.appBarMain.waterfallToolbar.resetAll();
mBinding.appBarMain.waterfallToolbar.setRecyclerView(null);
// Handle navigation view item clicks here. // Handle navigation view item clicks here.
Fragment fragment = null; Fragment fragment = null;

View File

@ -5,6 +5,7 @@ import android.util.Base64;
import java.io.IOException; import java.io.IOException;
import it.integry.integrywmsnative.core.settings.SettingsManager; import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityString;
import okhttp3.HttpUrl; import okhttp3.HttpUrl;
import okhttp3.Interceptor; import okhttp3.Interceptor;
import okhttp3.Request; import okhttp3.Request;
@ -19,7 +20,7 @@ public class HttpInterceptor implements Interceptor {
@Override @Override
public Response intercept(Chain chain) throws IOException { public Response intercept(Chain chain) throws IOException {
final String PROFILE_DB = SettingsManager.i().userSession.profileDB; final String PROFILE_DB = SettingsManager.i().userSession == null ? null : SettingsManager.i().userSession.profileDB;
final String USERNAME = SettingsManager.i().user.username; final String USERNAME = SettingsManager.i().user.username;
final String PASSWORD = SettingsManager.i().user.password; final String PASSWORD = SettingsManager.i().user.password;

View File

@ -12,6 +12,7 @@ import android.view.ViewGroup;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import it.integry.integrywmsnative.BuildConfig;
import it.integry.integrywmsnative.R; import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO; import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager; import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
@ -83,6 +84,7 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
@Override @Override
public void onDestroyView() { public void onDestroyView() {
mViewModel.closeLU();
BarcodeManager.removeCallback(barcodeScannerIstanceID); BarcodeManager.removeCallback(barcodeScannerIstanceID);
super.onDestroyView(); super.onDestroyView();
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -40,7 +40,7 @@
android:id="@+id/toolbar_title" android:id="@+id/toolbar_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/app_name" android:text="@string/integry"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:letterSpacing="-0.05" android:letterSpacing="-0.05"
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle" style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"
@ -58,7 +58,6 @@
android:visibility="gone" android:visibility="gone"
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"/> style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"/>
<androidx.appcompat.widget.SearchView <androidx.appcompat.widget.SearchView
android:id="@+id/main_search" android:id="@+id/main_search"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -1,5 +1,6 @@
<resources> <resources>
<string name="app_name" translatable="false">Integry WMS</string> <string name="app_name" translatable="false">Integry WMS</string>
<string name="integry" translatable="false">Integry</string>
<string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string>

2131
images/RoundLogoWithText.ai Normal file

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,7 @@ import androidx.annotation.RequiresApi
import androidx.core.widget.NestedScrollView import androidx.core.widget.NestedScrollView
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import android.view.ViewTreeObserver
import android.widget.ScrollView import android.widget.ScrollView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -33,6 +34,15 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
addRecyclerViewScrollListener() addRecyclerViewScrollListener()
} }
var recyclerViewScrollListener : RecyclerView.OnScrollListener = object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
// real position must always get updated
realPosition.value = realPosition.value + dy
mutualScrollListenerAction()
}
}
/** /**
* The scroll view whose scroll is going to be listened * The scroll view whose scroll is going to be listened
*/ */
@ -42,13 +52,25 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
addScrollViewScrollListener() addScrollViewScrollListener()
} }
var scrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
// real position must always get updated
realPosition.value = scrollView!!.scrollY
mutualScrollListenerAction()
}
/** /**
* The scroll view whose scroll is going to be listened * The scroll view whose scroll is going to be listened
*/ */
var nestedScrollView: NestedScrollView? = null var nestedScrollView: NestedScrollView? = null
set(value) { set(value) {
field = value field = value
addNestedScrollViewScrollListener() if (value != null) addNestedScrollViewScrollListener()
}
var nestedScrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
// real position must always get updated
realPosition.value = nestedScrollView!!.scrollY
mutualScrollListenerAction()
} }
/** /**
@ -144,11 +166,24 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
init(context, attrs) init(context, attrs)
} }
public fun resetElevation() { fun resetElevation() {
realPosition = Px(0) realPosition = Px(0)
cardElevation = 0f cardElevation = 0f
} }
fun resetAll() {
resetElevation()
removeNestedScrollViewScrollListener()
nestedScrollView = null
removeRecyclerViewScrollListener()
recyclerView = null
removeScrollViewScrollListener()
scrollView = null
}
private fun init(context: Context?, attrs: AttributeSet?) { private fun init(context: Context?, attrs: AttributeSet?) {
// leave card corners square // leave card corners square
radius = 0f radius = 0f
@ -183,29 +218,27 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
} }
private fun addRecyclerViewScrollListener() { private fun addRecyclerViewScrollListener() {
recyclerView?.addOnScrollListener(object : RecyclerView.OnScrollListener() { recyclerView?.addOnScrollListener(recyclerViewScrollListener)
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
// real position must always get updated
realPosition.value = realPosition.value + dy
mutualScrollListenerAction()
} }
})
private fun removeRecyclerViewScrollListener() {
recyclerView?.removeOnScrollListener(recyclerViewScrollListener)
} }
private fun addScrollViewScrollListener() { private fun addScrollViewScrollListener() {
scrollView?.viewTreeObserver?.addOnScrollChangedListener { scrollView?.viewTreeObserver?.addOnScrollChangedListener(scrollViewScrollListener)
// real position must always get updated
realPosition.value = scrollView!!.scrollY
mutualScrollListenerAction()
} }
private fun removeScrollViewScrollListener() {
scrollView?.viewTreeObserver?.removeOnScrollChangedListener(scrollViewScrollListener)
} }
private fun addNestedScrollViewScrollListener() { private fun addNestedScrollViewScrollListener() {
nestedScrollView?.viewTreeObserver?.addOnScrollChangedListener { nestedScrollView?.viewTreeObserver?.addOnScrollChangedListener(nestedScrollViewScrollListener)
realPosition.value = nestedScrollView!!.scrollY
mutualScrollListenerAction()
} }
private fun removeNestedScrollViewScrollListener() {
nestedScrollView?.viewTreeObserver?.removeOnScrollChangedListener(nestedScrollViewScrollListener)
} }
/** /**