First work on XML
This commit is contained in:
parent
620df27552
commit
f56bb7dd95
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@ -2,6 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/WMS.iml" filepath="$PROJECT_DIR$/WMS.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" />
|
<module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" />
|
<module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" />
|
||||||
|
|||||||
@ -124,8 +124,8 @@ public class MainActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean onNavigationItemSelected(MenuItem item) {
|
public boolean onNavigationItemSelected(MenuItem item) {
|
||||||
|
|
||||||
mBinding.appBarMain.waterfallToolbar.resetElevation();
|
//mBinding.appBarMain.waterfallToolbar.resetElevation();
|
||||||
mBinding.appBarMain.waterfallToolbar.setRecyclerView(null);
|
//mBinding.appBarMain.waterfallToolbar.setRecyclerView(null);
|
||||||
|
|
||||||
// Handle navigation view item clicks here.
|
// Handle navigation view item clicks here.
|
||||||
Fragment fragment = null;
|
Fragment fragment = null;
|
||||||
@ -194,7 +194,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(fragment instanceof IRecyclerFragment) {
|
if(fragment instanceof IRecyclerFragment) {
|
||||||
((IRecyclerFragment) fragment).setWaterfallToolbar(mBinding.appBarMain.waterfallToolbar);
|
//((IRecyclerFragment) fragment).setWaterfallToolbar(mBinding.appBarMain.waterfallToolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
||||||
@ -235,7 +235,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
private void init(){
|
private void init(){
|
||||||
|
|
||||||
initSessionData();
|
//initSessionData();
|
||||||
|
|
||||||
ServerStatusChecker.getIstance().addCallback(value -> {
|
ServerStatusChecker.getIstance().addCallback(value -> {
|
||||||
if(value && (!mIsOnline || firstCheckExecution)){
|
if(value && (!mIsOnline || firstCheckExecution)){
|
||||||
@ -269,7 +269,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
if(SettingsManager.iDB().getDatiAzienda() != null && SettingsManager.iDB().getDatiAzienda().isLogoAvailable()) {
|
if(SettingsManager.iDB().getDatiAzienda() != null && SettingsManager.iDB().getDatiAzienda().isLogoAvailable()) {
|
||||||
ImageView imageViewLogoAzienda = headerLayout.findViewById(R.id.drawer_logoAzienda);
|
ImageView imageViewLogoAzienda = headerLayout.findViewById(R.id.drawer_logoAzienda);
|
||||||
imageViewLogoAzienda.setImageBitmap(SettingsManager.iDB().getDatiAzienda().getLogo());
|
// imageViewLogoAzienda.setImageBitmap(SettingsManager.iDB().getDatiAzienda().getLogo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import androidx.fragment.app.Fragment;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.cachapa.expandablelayout.ExpandableLayout;
|
import net.cachapa.expandablelayout.ExpandableLayout;
|
||||||
@ -16,6 +18,7 @@ import net.cachapa.expandablelayout.ExpandableLayout;
|
|||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
import de.hdodenhof.circleimageview.CircleImageView;
|
||||||
import it.integry.integrywmsnative.MainActivity;
|
import it.integry.integrywmsnative.MainActivity;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||||
@ -33,7 +36,8 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
|||||||
|
|
||||||
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
||||||
@BindView(R.id.current_user_name) TextView currentUsername;
|
@BindView(R.id.current_user_name) TextView currentUsername;
|
||||||
//@BindView(R.id.drawer_username) TextView drawerUsername;
|
@BindView(R.id.current_deposito) TextView currentDeposito;
|
||||||
|
@BindView(R.id.drawer_logoAzienda) CircleImageView currentLogoAzienda;
|
||||||
|
|
||||||
private View mView;
|
private View mView;
|
||||||
|
|
||||||
@ -82,10 +86,19 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
|||||||
WiFiCheckerViewHolder wiFiCheckerViewHolder = new WiFiCheckerViewHolder(getActivity(), mView, R.id.wifi_power);
|
WiFiCheckerViewHolder wiFiCheckerViewHolder = new WiFiCheckerViewHolder(getActivity(), mView, R.id.wifi_power);
|
||||||
wiFiCheckerViewHolder.startMonitoring();
|
wiFiCheckerViewHolder.startMonitoring();
|
||||||
|
|
||||||
|
initSessionData();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSessionData() {
|
||||||
currentUsername.setText(SettingsManager.i().user.fullname);
|
currentUsername.setText(SettingsManager.i().user.fullname);
|
||||||
//drawerUsername.setText(SettingsManager.i().user.fullname);
|
|
||||||
|
|
||||||
|
//TextView textViewDeposito = headerLayout.findViewById(R.id.drawer_deposito);
|
||||||
|
currentDeposito.setText(String.format("%s - %s", SettingsManager.i().userSession.depo.getCodMdep(), SettingsManager.i().userSession.depo.getDescrizione()));
|
||||||
|
|
||||||
|
if(SettingsManager.iDB().getDatiAzienda() != null && SettingsManager.iDB().getDatiAzienda().isLogoAvailable()) {
|
||||||
|
currentLogoAzienda.setImageBitmap(SettingsManager.iDB().getDatiAzienda().getLogo());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collapseNoConnectionLayout(){
|
private void collapseNoConnectionLayout(){
|
||||||
|
|||||||
13
app/src/main/res/drawable/circular_background_alpha_7.xml
Normal file
13
app/src/main/res/drawable/circular_background_alpha_7.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<solid
|
||||||
|
android:color="@color/white_bg_alpha" />
|
||||||
|
|
||||||
|
<padding
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp" />
|
||||||
|
|
||||||
|
<corners android:radius="500dp" />
|
||||||
|
</shape>
|
||||||
12
app/src/main/res/drawable/dashboard_header_bg.xml
Normal file
12
app/src/main/res/drawable/dashboard_header_bg.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<solid android:color="@color/colorPrimaryDark" />
|
||||||
|
|
||||||
|
<padding
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp" />
|
||||||
|
|
||||||
|
<corners android:radius="@dimen/standard_rounc" />
|
||||||
|
</shape>
|
||||||
@ -9,52 +9,53 @@
|
|||||||
tools:context="it.integry.integrywmsnative.MainActivity">
|
tools:context="it.integry.integrywmsnative.MainActivity">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
<it.integry.plugins.waterfalltoolbar.WaterfallToolbar
|
android:id="@+id/toolbar"
|
||||||
android:id="@+id/waterfall_toolbar"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="?actionBarSize"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="?attr/actionBarSize">
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="Integry WMS"
|
||||||
|
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<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"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:iconifiedByDefault="true"
|
android:iconifiedByDefault="true"
|
||||||
app:defaultQueryHint="@string/search"
|
app:defaultQueryHint="@string/search"
|
||||||
app:iconifiedByDefault="true"
|
app:iconifiedByDefault="true"
|
||||||
android:layout_gravity="end"/>
|
android:layout_gravity="end"/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_filter"
|
android:id="@+id/main_filter"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:src="@drawable/ic_search_black_24dp"
|
android:src="@drawable/ic_search_black_24dp"
|
||||||
android:tint="@color/colorPrimaryGray"/>
|
android:tint="@color/colorPrimaryGray"/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/main_select_all"
|
android:id="@+id/main_select_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:src="@drawable/ic_check_black_24dp"
|
android:src="@drawable/ic_check_black_24dp"
|
||||||
android:tint="@color/colorPrimaryGray"/>
|
android:tint="@color/colorPrimaryGray"/>
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
</it.integry.plugins.waterfalltoolbar.WaterfallToolbar>
|
|
||||||
|
|
||||||
|
|
||||||
<include layout="@layout/content_main" />
|
<include layout="@layout/content_main" />
|
||||||
|
|||||||
@ -40,6 +40,116 @@
|
|||||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="45dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:background="@drawable/dashboard_header_bg">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/current_user_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
tools:text="Android Studio"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/current_deposito"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/white_bg_alpha"
|
||||||
|
tools:text="android.studio@android.com" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/layout_logo_azienda"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:background="@drawable/circular_background_alpha_7"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/circular_background">
|
||||||
|
|
||||||
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
|
android:id="@+id/drawer_logoAzienda"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/central_guideline_dashboard"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardBackgroundColor="@android:color/white"
|
||||||
|
app:cardCornerRadius="4dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/central_guideline_dashboard">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_barcode_96"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
app:cardBackgroundColor="@android:color/white"
|
app:cardBackgroundColor="@android:color/white"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
@ -82,25 +192,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.40"/>
|
app:layout_constraintGuide_percent="0.40"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="Utente corrente"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/current_user_name"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
android:text="N/A"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline_username"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
android:id="@+id/drawer_logoAzienda"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||||
|
|||||||
@ -6,4 +6,6 @@
|
|||||||
<dimen name="nav_header_height">160dp</dimen>
|
<dimen name="nav_header_height">160dp</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="bottom_sheet_round16">16dp</dimen>
|
<dimen name="bottom_sheet_round16">16dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="standard_rounc">16dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
|
||||||
|
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user