commit 2094a4d36c17dc14e6f095329a9eca8650bb3a9e Author: Geoffroy Bonneville Date: Tue Nov 24 11:23:31 2015 -0500 Project start diff --git a/DoNExt/.gitignore b/DoNExt/.gitignore new file mode 100644 index 0000000..c6cbe56 --- /dev/null +++ b/DoNExt/.gitignore @@ -0,0 +1,8 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/DoNExt/.idea/.name b/DoNExt/.idea/.name new file mode 100644 index 0000000..dde9e84 --- /dev/null +++ b/DoNExt/.idea/.name @@ -0,0 +1 @@ +DoNExt \ No newline at end of file diff --git a/DoNExt/.idea/compiler.xml b/DoNExt/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/DoNExt/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DoNExt/.idea/copyright/profiles_settings.xml b/DoNExt/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/DoNExt/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/DoNExt/.idea/gradle.xml b/DoNExt/.idea/gradle.xml new file mode 100644 index 0000000..261ec28 --- /dev/null +++ b/DoNExt/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/DoNExt/.idea/misc.xml b/DoNExt/.idea/misc.xml new file mode 100644 index 0000000..e45faed --- /dev/null +++ b/DoNExt/.idea/misc.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DoNExt/.idea/modules.xml b/DoNExt/.idea/modules.xml new file mode 100644 index 0000000..ebf04a4 --- /dev/null +++ b/DoNExt/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/DoNExt/.idea/runConfigurations.xml b/DoNExt/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/DoNExt/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/DoNExt/.idea/vcs.xml b/DoNExt/.idea/vcs.xml new file mode 100644 index 0000000..6564d52 --- /dev/null +++ b/DoNExt/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DoNExt/app/.gitignore b/DoNExt/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/DoNExt/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/DoNExt/app/build.gradle b/DoNExt/app/build.gradle new file mode 100644 index 0000000..c47a628 --- /dev/null +++ b/DoNExt/app/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.2" + + defaultConfig { + applicationId "com.wismna.geoffroy.donext" + minSdkVersion 15 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + testCompile 'junit:junit:4.12' + compile 'com.android.support:appcompat-v7:23.1.1' + compile 'com.android.support:design:23.1.1' +} diff --git a/DoNExt/app/proguard-rules.pro b/DoNExt/app/proguard-rules.pro new file mode 100644 index 0000000..8e8d6d0 --- /dev/null +++ b/DoNExt/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /opt/Android/Sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# 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 *; +#} diff --git a/DoNExt/app/src/androidTest/java/com/wismna/geoffroy/donext/ApplicationTest.java b/DoNExt/app/src/androidTest/java/com/wismna/geoffroy/donext/ApplicationTest.java new file mode 100644 index 0000000..81cfef3 --- /dev/null +++ b/DoNExt/app/src/androidTest/java/com/wismna/geoffroy/donext/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.wismna.geoffroy.donext; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/DoNExt/app/src/main/AndroidManifest.xml b/DoNExt/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5d0af44 --- /dev/null +++ b/DoNExt/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/MainActivity.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/MainActivity.java new file mode 100644 index 0000000..d36c2fb --- /dev/null +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/MainActivity.java @@ -0,0 +1,162 @@ +package com.wismna.geoffroy.donext; + +import android.support.design.widget.TabLayout; +import android.support.design.widget.FloatingActionButton; +import android.support.design.widget.Snackbar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; + +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentPagerAdapter; +import android.support.v4.view.ViewPager; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; + +import android.widget.TextView; + +public class MainActivity extends AppCompatActivity { + + /** + * The {@link android.support.v4.view.PagerAdapter} that will provide + * fragments for each of the sections. We use a + * {@link FragmentPagerAdapter} derivative, which will keep every + * loaded fragment in memory. If this becomes too memory intensive, it + * may be best to switch to a + * {@link android.support.v4.app.FragmentStatePagerAdapter}. + */ + private SectionsPagerAdapter mSectionsPagerAdapter; + + /** + * The {@link ViewPager} that will host the section contents. + */ + private ViewPager mViewPager; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + // Create the adapter that will return a fragment for each of the three + // primary sections of the activity. + mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); + + // Set up the ViewPager with the sections adapter. + mViewPager = (ViewPager) findViewById(R.id.container); + mViewPager.setAdapter(mSectionsPagerAdapter); + + TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); + tabLayout.setupWithViewPager(mViewPager); + + FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) + .setAction("Action", null).show(); + } + }); + + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + + /** + * A placeholder fragment containing a simple view. + */ + public static class PlaceholderFragment extends Fragment { + /** + * The fragment argument representing the section number for this + * fragment. + */ + private static final String ARG_SECTION_NUMBER = "section_number"; + + public PlaceholderFragment() { + } + + /** + * Returns a new instance of this fragment for the given section + * number. + */ + public static PlaceholderFragment newInstance(int sectionNumber) { + PlaceholderFragment fragment = new PlaceholderFragment(); + Bundle args = new Bundle(); + args.putInt(ARG_SECTION_NUMBER, sectionNumber); + fragment.setArguments(args); + return fragment; + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View rootView = inflater.inflate(R.layout.fragment_main, container, false); + TextView textView = (TextView) rootView.findViewById(R.id.section_label); + textView.setText(getString(R.string.section_format, getArguments().getInt(ARG_SECTION_NUMBER))); + return rootView; + } + } + + /** + * A {@link FragmentPagerAdapter} that returns a fragment corresponding to + * one of the sections/tabs/pages. + */ + public class SectionsPagerAdapter extends FragmentPagerAdapter { + + public SectionsPagerAdapter(FragmentManager fm) { + super(fm); + } + + @Override + public Fragment getItem(int position) { + // getItem is called to instantiate the fragment for the given page. + // Return a PlaceholderFragment (defined as a static inner class below). + return PlaceholderFragment.newInstance(position + 1); + } + + @Override + public int getCount() { + // Show 3 total pages. + return 3; + } + + @Override + public CharSequence getPageTitle(int position) { + switch (position) { + case 0: + return "SECTION 1"; + case 1: + return "SECTION 2"; + case 2: + return "SECTION 3"; + } + return null; + } + } +} diff --git a/DoNExt/app/src/main/res/layout/activity_main.xml b/DoNExt/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..d049d0f --- /dev/null +++ b/DoNExt/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + diff --git a/DoNExt/app/src/main/res/layout/fragment_main.xml b/DoNExt/app/src/main/res/layout/fragment_main.xml new file mode 100644 index 0000000..f917e13 --- /dev/null +++ b/DoNExt/app/src/main/res/layout/fragment_main.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/DoNExt/app/src/main/res/menu/menu_main.xml b/DoNExt/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000..1e8d66c --- /dev/null +++ b/DoNExt/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,10 @@ + + + diff --git a/DoNExt/app/src/main/res/mipmap-hdpi/ic_launcher.png b/DoNExt/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/DoNExt/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/DoNExt/app/src/main/res/mipmap-mdpi/ic_launcher.png b/DoNExt/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/DoNExt/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/DoNExt/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/DoNExt/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/DoNExt/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/DoNExt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/DoNExt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/DoNExt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/DoNExt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/DoNExt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..aee44e1 Binary files /dev/null and b/DoNExt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/DoNExt/app/src/main/res/values-v21/styles.xml b/DoNExt/app/src/main/res/values-v21/styles.xml new file mode 100644 index 0000000..251fb9f --- /dev/null +++ b/DoNExt/app/src/main/res/values-v21/styles.xml @@ -0,0 +1,9 @@ +> + + + diff --git a/DoNExt/app/src/main/res/values-w820dp/dimens.xml b/DoNExt/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000..63fc816 --- /dev/null +++ b/DoNExt/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ + + + 64dp + diff --git a/DoNExt/app/src/main/res/values/colors.xml b/DoNExt/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..3ab3e9c --- /dev/null +++ b/DoNExt/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #3F51B5 + #303F9F + #FF4081 + diff --git a/DoNExt/app/src/main/res/values/dimens.xml b/DoNExt/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..cef3abc --- /dev/null +++ b/DoNExt/app/src/main/res/values/dimens.xml @@ -0,0 +1,7 @@ + + + 16dp + 16dp + 16dp + 8dp + diff --git a/DoNExt/app/src/main/res/values/strings.xml b/DoNExt/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..a6d067b --- /dev/null +++ b/DoNExt/app/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ + + DoNExt + Settings + Hello World from section: %1$d + diff --git a/DoNExt/app/src/main/res/values/styles.xml b/DoNExt/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..545b9c6 --- /dev/null +++ b/DoNExt/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + +