commit fcfcd1b40858c2e0c4607ca0939541803b9f2478 Author: Mathieu Sanchez Date: Wed Mar 20 12:50:23 2019 +0900 Copy from github diff --git a/ChungAngUniversityProject.iml b/ChungAngUniversityProject.iml new file mode 100644 index 0000000..a9d804f --- /dev/null +++ b/ChungAngUniversityProject.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/app.iml b/app/app.iml new file mode 100644 index 0000000..8f63899 --- /dev/null +++ b/app/app.iml @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..45c3743 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,34 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 28 + defaultConfig { + applicationId "project.mobile.cau.sanchez.mathieu.mybmw" + minSdkVersion 19 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + 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:support-v4:28.0.0' + implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation 'com.android.support:cardview-v7: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' + + implementation 'de.hdodenhof:circleimageview:2.2.0' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/app/proguard-rules.pro @@ -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 diff --git a/app/src/androidTest/java/project/mobile/cau/sanchez/mathieu/mybmw/ExampleInstrumentedTest.java b/app/src/androidTest/java/project/mobile/cau/sanchez/mathieu/mybmw/ExampleInstrumentedTest.java new file mode 100644 index 0000000..69a4486 --- /dev/null +++ b/app/src/androidTest/java/project/mobile/cau/sanchez/mathieu/mybmw/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals( "project.mobile.cau.sanchez.mathieu.mybmw", appContext.getPackageName() ); + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0246266 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png new file mode 100644 index 0000000..34c4267 Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ContentFragment.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ContentFragment.java new file mode 100644 index 0000000..9b6765a --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ContentFragment.java @@ -0,0 +1,41 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +/** + * A simple {@link Fragment} subclass. + */ +public class ContentFragment extends Fragment { + + String titleString = ""; + TextView title; + + public ContentFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView( @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ) { + assert getArguments() != null; + titleString = getArguments().getString( "title" ); + + return inflater.inflate( R.layout.fragment_content, container, false ); + } + + @Override + public void onViewCreated( @NonNull View view, @Nullable Bundle savedInstanceState ) { + super.onViewCreated( view, savedInstanceState ); + + title = view.findViewById( R.id.title ); + title.setText( titleString ); + } +} diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ExpandableListAdapter.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ExpandableListAdapter.java new file mode 100644 index 0000000..57bc93c --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/ExpandableListAdapter.java @@ -0,0 +1,108 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +import android.content.Context; +import android.graphics.Typeface; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseExpandableListAdapter; +import android.widget.TextView; + +import java.util.HashMap; +import java.util.List; + +public class ExpandableListAdapter extends BaseExpandableListAdapter { + private Context context; + private List listDataHeader; + private HashMap> listDataChild; + + public ExpandableListAdapter(Context context, List listDataHeader, + HashMap> listChildData) { + this.context = context; + this.listDataHeader = listDataHeader; + this.listDataChild = listChildData; + } + + @Override + public MenuModel getChild(int groupPosition, int childPosititon) { + return this.listDataChild.get(this.listDataHeader.get(groupPosition)) + .get(childPosititon); + } + + @Override + public long getChildId(int groupPosition, int childPosition) { + return childPosition; + } + + @Override + public View getChildView(int groupPosition, final int childPosition, + boolean isLastChild, View convertView, ViewGroup parent) { + + final String childText = getChild(groupPosition, childPosition).menuName; + + if (convertView == null) { + LayoutInflater infalInflater = (LayoutInflater) this.context + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + convertView = infalInflater.inflate(R.layout.list_group_child, null); + } + + TextView txtListChild = convertView + .findViewById(R.id.lblListItem); + + txtListChild.setText(childText); + return convertView; + } + + @Override + public int getChildrenCount(int groupPosition) { + + if (this.listDataChild.get(this.listDataHeader.get(groupPosition)) == null) + return 0; + else + return this.listDataChild.get(this.listDataHeader.get(groupPosition)) + .size(); + } + + @Override + public MenuModel getGroup(int groupPosition) { + return this.listDataHeader.get(groupPosition); + } + + @Override + public int getGroupCount() { + return this.listDataHeader.size(); + + } + + @Override + public long getGroupId(int groupPosition) { + return groupPosition; + } + + @Override + public View getGroupView(int groupPosition, boolean isExpanded, + View convertView, ViewGroup parent) { + String headerTitle = getGroup(groupPosition).menuName; + if (convertView == null) { + LayoutInflater infalInflater = (LayoutInflater) this.context + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + convertView = infalInflater.inflate(R.layout.list_group_header, null); + } + + TextView lblListHeader = convertView.findViewById(R.id.lblListHeader); + lblListHeader.setTypeface(null, Typeface.BOLD); + lblListHeader.setText(headerTitle); + + return convertView; + } + + @Override + public boolean hasStableIds() { + return false; + } + + @Override + public boolean isChildSelectable(int groupPosition, int childPosition) { + return true; + } +} diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainActivity.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainActivity.java new file mode 100644 index 0000000..57369c6 --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainActivity.java @@ -0,0 +1,270 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentTransaction; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.support.design.widget.NavigationView; +import android.support.v4.view.GravityCompat; +import android.support.v4.widget.DrawerLayout; +import android.support.v7.app.ActionBarDrawerToggle; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.MenuItem; +import android.widget.ExpandableListView; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { + + private final static String TAG = MainActivity.class.getSimpleName(); + + ExpandableListAdapter expandableListAdapter; + ExpandableListView expandableListView; + List< MenuModel > headerList = new ArrayList<>(); + HashMap< MenuModel, List< MenuModel > > childList = new HashMap<>(); + DrawerLayout drawer; + + // Fragments + MainFragment mainFragment = new MainFragment(); + ContentFragment contentFragment = new ContentFragment(); + SerieFragment serieFragment = new SerieFragment(); + + Boolean isMainFragment = true; + + @Override + protected void onCreate( Bundle savedInstanceState ) { + super.onCreate( savedInstanceState ); + setContentView( R.layout.activity_main ); + Toolbar toolbar = findViewById( R.id.toolbar ); + setSupportActionBar( toolbar ); + + expandableListView = findViewById( R.id.expandableListView ); + + prepareMenuData(); + populateExpandableList(); + + drawer = findViewById( R.id.drawer_layout ); + ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( + this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close ); + drawer.addDrawerListener( toggle ); + toggle.syncState(); + + NavigationView navigationView = findViewById( R.id.nav_view ); + navigationView.setNavigationItemSelectedListener( this ); + + setFragment( mainFragment ); + } + + private void setFragment( Fragment fragment ) { + FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); + + fragmentTransaction.replace( R.id.fragment_container, fragment ); + fragmentTransaction.commit(); + drawer.closeDrawer( Gravity.LEFT ); + + isMainFragment = fragment.getClass().equals( mainFragment.getClass() ); + } + + @Override + public void onBackPressed() { + DrawerLayout drawer = findViewById( R.id.drawer_layout ); + + if ( drawer.isDrawerOpen( GravityCompat.START ) ) { + drawer.closeDrawer( GravityCompat.START ); + } else if ( !isMainFragment ) { + setFragment( mainFragment ); + } else { + super.onBackPressed(); + } + } + + @Override + public boolean onNavigationItemSelected( MenuItem item ) { + // Handle navigation view item clicks here. + int id = item.getItemId(); + + if ( id == R.id.nav_gallery ) { + + } else if ( id == R.id.nav_slideshow ) { + + } else if ( id == R.id.nav_manage ) { + + } else if ( id == R.id.nav_share ) { + + } else if ( id == R.id.nav_send ) { + + } + + DrawerLayout drawer = findViewById( R.id.drawer_layout ); + drawer.closeDrawer( GravityCompat.START ); + return true; + } + + private void prepareMenuData() { + List< MenuModel > childModelsList; + + for ( int i = 1; i < 9; i++ ) { + MenuModel menuModel = new MenuModel( Integer.toString( i ) + " Serie", true, true ); + headerList.add( menuModel ); + + childModelsList = new ArrayList<>(); + + switch ( i ) { + case 1: + childModelsList.add( new MenuModel( "E81/E82/E87/E88", false, false ) ); + childModelsList.add( new MenuModel( "F20/F21", false, false ) ); + childModelsList.add( new MenuModel( "F52", false, false ) ); + break; + case 2: + childModelsList.add( new MenuModel( "F22", false, false ) ); + childModelsList.add( new MenuModel( "F45", false, false ) ); + childModelsList.add( new MenuModel( "F46", false, false ) ); + break; + case 3: + childModelsList.add( new MenuModel( "E21", false, false ) ); + childModelsList.add( new MenuModel( "E30", false, false ) ); + childModelsList.add( new MenuModel( "E36", false, false ) ); + childModelsList.add( new MenuModel( "E46", false, false ) ); + childModelsList.add( new MenuModel( "E90/E91/E92/E93", false, false ) ); + childModelsList.add( new MenuModel( "F30/F31/F34", false, false ) ); + childModelsList.add( new MenuModel( "G20", false, false ) ); + break; + case 4: + childModelsList.add( new MenuModel( "F32/F33/F36", false, false ) ); + break; + case 5: + childModelsList.add( new MenuModel( "E12", false, false ) ); + childModelsList.add( new MenuModel( "E28", false, false ) ); + childModelsList.add( new MenuModel( "E34", false, false ) ); + childModelsList.add( new MenuModel( "E39", false, false ) ); + childModelsList.add( new MenuModel( "E60/E61", false, false ) ); + childModelsList.add( new MenuModel( "F10/F11/F07", false, false ) ); + childModelsList.add( new MenuModel( "G30/G31/G38", false, false ) ); + break; + case 6: + childModelsList.add( new MenuModel( "E24", false, false ) ); + childModelsList.add( new MenuModel( "E63/E64", false, false ) ); + childModelsList.add( new MenuModel( "F06/F12/F13", false, false ) ); + childModelsList.add( new MenuModel( "G32", false, false ) ); + break; + case 7: + childModelsList.add( new MenuModel( "E23", false, false ) ); + childModelsList.add( new MenuModel( "E32", false, false ) ); + childModelsList.add( new MenuModel( "E38", false, false ) ); + childModelsList.add( new MenuModel( "E65/E66/E67/E68", false, false ) ); + childModelsList.add( new MenuModel( "F01/F02/F03/F04", false, false ) ); + childModelsList.add( new MenuModel( "G11/G12", false, false ) ); + break; + case 8: + childModelsList.add( new MenuModel( "E31", false, false ) ); + childModelsList.add( new MenuModel( "G14/G15/G16", false, false ) ); + break; + } + + if ( menuModel.hasChildren ) { + childList.put( menuModel, childModelsList ); + } + } + } + + private void populateExpandableList() { + + expandableListAdapter = new ExpandableListAdapter( this, headerList, childList ); + expandableListView.setAdapter( expandableListAdapter ); + + expandableListView.setOnGroupClickListener( new ExpandableListView.OnGroupClickListener() { + @Override + public boolean onGroupClick( ExpandableListView parent, View v, int groupPosition, long id ) { + + if ( headerList.get( groupPosition ).isGroup ) { + if ( !headerList.get( groupPosition ).hasChildren ) { + onBackPressed(); + } + } + + return false; + } + } ); + + expandableListView.setOnChildClickListener( new ExpandableListView.OnChildClickListener() { + @Override + public boolean onChildClick( ExpandableListView parent, View v, int groupPosition, int childPosition, long id ) { + + if ( childList.get( headerList.get( groupPosition ) ) != null ) { + List list = childList.get( headerList.get( groupPosition ) ); + assert list != null; + MenuModel model = (MenuModel) list.get( childPosition ); + + sendDataFragment( contentFragment, model.menuName ); + setFragment( contentFragment ); +// Log.d( TAG, model.menuName ); + } + + return false; + } + } ); + } + + public void sendDataFragment( Fragment fragment, String data ) { + Bundle bundle = new Bundle(); + + bundle.putString( "title", data ); + fragment.setArguments( bundle ); + } + + public void sendDataFragment( Fragment fragment, String data, List list ) { + Bundle bundle = new Bundle(); + ArrayList< MenuModel > arrayList = new ArrayList<>( list ); + + bundle.putString( "title", data ); + bundle.putSerializable( "list", arrayList ); + + fragment.setArguments( bundle ); + } + + public void onClickSerie1( View view ) { + sendDataFragment( serieFragment, "1 Serie", childList.get( headerList.get( 0 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie2( View view ) { + sendDataFragment( serieFragment, "2 Serie", childList.get( headerList.get( 1 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie3( View view ) { + sendDataFragment( serieFragment, "3 Serie", childList.get( headerList.get( 2 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie4( View view ) { + sendDataFragment( serieFragment, "4 Serie", childList.get( headerList.get( 3 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie5( View view ) { + sendDataFragment( serieFragment, "5 Serie", childList.get( headerList.get( 4 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie6( View view ) { + sendDataFragment( serieFragment, "6 Serie", childList.get( headerList.get( 5 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie7( View view ) { + sendDataFragment( serieFragment, "7 Serie", childList.get( headerList.get( 6 ) ) ); + setFragment( serieFragment ); + } + + public void onClickSerie8( View view ) { + sendDataFragment( serieFragment, "8 Serie", childList.get( headerList.get( 7 ) ) ); + setFragment( serieFragment ); + } + +} diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainFragment.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainFragment.java new file mode 100644 index 0000000..fc45fa8 --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MainFragment.java @@ -0,0 +1,29 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + + +/** + * A simple {@link Fragment} subclass. + */ +public class MainFragment extends Fragment { + + + public MainFragment() { + // Required empty public constructor + } + + + @Override + public View onCreateView( LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState ) { + // Inflate the layout for this fragment + return inflater.inflate( R.layout.fragment_main, container, false ); + } + +} diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MenuModel.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MenuModel.java new file mode 100644 index 0000000..7f28175 --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/MenuModel.java @@ -0,0 +1,17 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +import java.io.Serializable; + +class MenuModel implements Serializable { + + String menuName; + boolean hasChildren, isGroup; + + MenuModel( String menuName, boolean isGroup, boolean hasChildren ) { + + this.menuName = menuName; + this.isGroup = isGroup; + this.hasChildren = hasChildren; + } + +} \ No newline at end of file diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SerieFragment.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SerieFragment.java new file mode 100644 index 0000000..a21109f --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SerieFragment.java @@ -0,0 +1,50 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import java.util.ArrayList; + +public class SerieFragment extends Fragment { + + TextView title; + String titleString = ""; + ArrayList list; + ArrayList listForListView; + + public SerieFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView( @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ) { + + assert getArguments() != null; + titleString = getArguments().getString( "title" ); + list = (ArrayList< MenuModel >) getArguments().getSerializable( "list" ); + listForListView = new ArrayList<>(); + + for ( MenuModel model : list ) { + listForListView.add( model.menuName ); + } + + Log.d( "Serie Fragment", titleString + list.toString() ); + + return inflater.inflate( R.layout.fragment_serie, container, false ); + } + + @Override + public void onViewCreated( @NonNull View view, @Nullable Bundle savedInstanceState ) { + super.onViewCreated( view, savedInstanceState ); + + title = view.findViewById( R.id.title ); + title.setText( titleString ); + } +} diff --git a/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SplashScreenActivity.java b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SplashScreenActivity.java new file mode 100644 index 0000000..1ff2cac --- /dev/null +++ b/app/src/main/java/project/mobile/cau/sanchez/mathieu/mybmw/SplashScreenActivity.java @@ -0,0 +1,53 @@ +package project.mobile.cau.sanchez.mathieu.mybmw; + +import android.content.Intent; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.os.Handler; +import android.view.View; + +public class SplashScreenActivity extends AppCompatActivity { + + private View mContentView; + + @Override + protected void onCreate( Bundle savedInstanceState ) { + super.onCreate( savedInstanceState ); + + setContentView( R.layout.activity_splash_screen ); + + mContentView = findViewById( R.id.fullscreen_content ); + } + + @Override + protected void onStart() { + super.onStart(); + + hide(); + + Handler handler = new Handler(); + handler.postDelayed( new Runnable() { + @Override + public void run() { + startActivity( new Intent( SplashScreenActivity.this, MainActivity.class ) ); + finish(); + } + }, 2500 ); + } + + private void hide() { + ActionBar actionBar = getSupportActionBar(); + if ( actionBar != null ) { + actionBar.hide(); + } + + mContentView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LOW_PROFILE + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ); + } + +} diff --git a/app/src/main/res/drawable-v21/ic_menu_camera.xml b/app/src/main/res/drawable-v21/ic_menu_camera.xml new file mode 100644 index 0000000..634fe92 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_camera.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_gallery.xml b/app/src/main/res/drawable-v21/ic_menu_gallery.xml new file mode 100644 index 0000000..03c7709 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_gallery.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_manage.xml b/app/src/main/res/drawable-v21/ic_menu_manage.xml new file mode 100644 index 0000000..aeb047d --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_manage.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/ic_menu_send.xml b/app/src/main/res/drawable-v21/ic_menu_send.xml new file mode 100644 index 0000000..fdf1c90 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_send.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_share.xml b/app/src/main/res/drawable-v21/ic_menu_share.xml new file mode 100644 index 0000000..338d95a --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_menu_slideshow.xml b/app/src/main/res/drawable-v21/ic_menu_slideshow.xml new file mode 100644 index 0000000..5e9e163 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_menu_slideshow.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..1f6bb29 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..0d025f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/logo.png b/app/src/main/res/drawable/logo.png new file mode 100644 index 0000000..ac98bce Binary files /dev/null and b/app/src/main/res/drawable/logo.png differ diff --git a/app/src/main/res/drawable/serie_1.jpg b/app/src/main/res/drawable/serie_1.jpg new file mode 100644 index 0000000..a939137 Binary files /dev/null and b/app/src/main/res/drawable/serie_1.jpg differ diff --git a/app/src/main/res/drawable/serie_2.jpg b/app/src/main/res/drawable/serie_2.jpg new file mode 100644 index 0000000..bec5255 Binary files /dev/null and b/app/src/main/res/drawable/serie_2.jpg differ diff --git a/app/src/main/res/drawable/serie_3.jpg b/app/src/main/res/drawable/serie_3.jpg new file mode 100644 index 0000000..a7be31c Binary files /dev/null and b/app/src/main/res/drawable/serie_3.jpg differ diff --git a/app/src/main/res/drawable/serie_4.jpg b/app/src/main/res/drawable/serie_4.jpg new file mode 100644 index 0000000..2e4acdc Binary files /dev/null and b/app/src/main/res/drawable/serie_4.jpg differ diff --git a/app/src/main/res/drawable/serie_5.jpg b/app/src/main/res/drawable/serie_5.jpg new file mode 100644 index 0000000..1edc8d6 Binary files /dev/null and b/app/src/main/res/drawable/serie_5.jpg differ diff --git a/app/src/main/res/drawable/serie_6.jpg b/app/src/main/res/drawable/serie_6.jpg new file mode 100644 index 0000000..72d1583 Binary files /dev/null and b/app/src/main/res/drawable/serie_6.jpg differ diff --git a/app/src/main/res/drawable/serie_7.jpg b/app/src/main/res/drawable/serie_7.jpg new file mode 100644 index 0000000..341d686 Binary files /dev/null and b/app/src/main/res/drawable/serie_7.jpg differ diff --git a/app/src/main/res/drawable/serie_8.jpg b/app/src/main/res/drawable/serie_8.jpg new file mode 100644 index 0000000..63dbaaa Binary files /dev/null and b/app/src/main/res/drawable/serie_8.jpg differ diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/side_nav_bar.xml new file mode 100644 index 0000000..6d81870 --- /dev/null +++ b/app/src/main/res/drawable/side_nav_bar.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..9500490 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_splash_screen.xml b/app/src/main/res/layout/activity_splash_screen.xml new file mode 100644 index 0000000..8e0bba4 --- /dev/null +++ b/app/src/main/res/layout/activity_splash_screen.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml new file mode 100644 index 0000000..1b78829 --- /dev/null +++ b/app/src/main/res/layout/app_bar_main.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml new file mode 100644 index 0000000..81495b4 --- /dev/null +++ b/app/src/main/res/layout/content_main.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_content.xml b/app/src/main/res/layout/fragment_content.xml new file mode 100644 index 0000000..0da2742 --- /dev/null +++ b/app/src/main/res/layout/fragment_content.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml new file mode 100644 index 0000000..48ef0c7 --- /dev/null +++ b/app/src/main/res/layout/fragment_main.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_serie.xml b/app/src/main/res/layout/fragment_serie.xml new file mode 100644 index 0000000..f6e6009 --- /dev/null +++ b/app/src/main/res/layout/fragment_serie.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_group_child.xml b/app/src/main/res/layout/list_group_child.xml new file mode 100644 index 0000000..a540153 --- /dev/null +++ b/app/src/main/res/layout/list_group_child.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_group_header.xml b/app/src/main/res/layout/list_group_header.xml new file mode 100644 index 0000000..6006c30 --- /dev/null +++ b/app/src/main/res/layout/list_group_header.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml new file mode 100644 index 0000000..4c3439a --- /dev/null +++ b/app/src/main/res/layout/nav_header_main.xml @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml new file mode 100644 index 0000000..450762f --- /dev/null +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml new file mode 100644 index 0000000..a2411e3 --- /dev/null +++ b/app/src/main/res/menu/main.xml @@ -0,0 +1,9 @@ + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..5067ea3 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..6491b0d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..e157e04 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..87fd91f Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..937a68b Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..6127c70 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..fcf3007 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..5e7f880 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..442eb15 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..eb9895c Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..ecead41 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..0534ed5 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..f36b9d4 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..2018ebf Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..d3bf9a2 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml new file mode 100644 index 0000000..fd7a058 --- /dev/null +++ b/app/src/main/res/values-v21/styles.xml @@ -0,0 +1,8 @@ + + + + diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml new file mode 100644 index 0000000..7ce840e --- /dev/null +++ b/app/src/main/res/values/attrs.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..cbd5bb0 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,8 @@ + + + #008577 + #00574B + #D81B60 + + #66000000 + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..4ab4520 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ + + + 16dp + 16dp + 8dp + 176dp + 16dp + \ No newline at end of file diff --git a/app/src/main/res/values/drawables.xml b/app/src/main/res/values/drawables.xml new file mode 100644 index 0000000..52c6a6c --- /dev/null +++ b/app/src/main/res/values/drawables.xml @@ -0,0 +1,8 @@ + + @android:drawable/ic_menu_camera + @android:drawable/ic_menu_gallery + @android:drawable/ic_menu_slideshow + @android:drawable/ic_menu_manage + @android:drawable/ic_menu_share + @android:drawable/ic_menu_send + diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..b8d4746 --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #F2F2F2 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..ca84984 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,14 @@ + + + My BMW + MainActivity + Open navigation drawer + Close navigation drawer + Android Studio + android.studio@android.com + Navigation header + Settings + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quam odio, pellentesque eget ipsum sit amet, accumsan facilisis elit. Vestibulum sed nisl viverra, maximus sapien a, egestas nisi. Donec aliquam luctus gravida. Etiam vel leo id odio aliquam consequat. Maecenas lobortis velit luctus tortor lacinia dictum. Aenean id neque eget nibh eleifend condimentum. Nam vitae congue sapien. Vestibulum et nulla id ante dictum varius. Praesent imperdiet, ligula ut pharetra sagittis, orci elit mattis diam, ac maximus justo lectus accumsan magna. Etiam aliquet aliquam porttitor. Nam et accumsan felis. Donec sem sapien, mollis a consectetur ac, interdum at est. Pellentesque tincidunt lorem sed iaculis porttitor. In in ex sapien. Mauris odio erat, ornare non cursus et, ultricies eu mauris. Nunc luctus sem eget odio malesuada, vitae varius metus viverra. In molestie molestie sapien sagittis tempor. Sed tincidunt eleifend nisl nec rutrum. + + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..997cf93 --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + +