diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b75303 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..15a15b2 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..2996d53 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..37a7509 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 10a4491..7242676 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# IntegratedMicroApps-AndroidSample - +# IntegratedMicroApps-Android IntegratedMicroApps-Android [![minSdk](https://img.shields.io/badge/minSdk-21-green.svg)](#) + 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/build.gradle b/app/build.gradle new file mode 100644 index 0000000..6b942a9 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 28 + defaultConfig { + applicationId "com.example.final_project" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7: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' +} 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/com/example/final_project/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/final_project/ExampleInstrumentedTest.java new file mode 100644 index 0000000..87f5888 --- /dev/null +++ b/app/src/androidTest/java/com/example/final_project/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.final_project; + +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("com.example.final_project", appContext.getPackageName()); + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f8267b1 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/final_project/AlbumActivity.java b/app/src/main/java/com/example/final_project/AlbumActivity.java new file mode 100644 index 0000000..9e8624d --- /dev/null +++ b/app/src/main/java/com/example/final_project/AlbumActivity.java @@ -0,0 +1,34 @@ +package com.example.final_project; + +import android.support.v4.view.ViewPager; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.MenuItem; + +public class AlbumActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_album); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + ViewPager viewPager=(ViewPager)findViewById(R.id.viewPager); + ImageAdapter adapter=new ImageAdapter(this); + viewPager.setAdapter(adapter); + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } +} + diff --git a/app/src/main/java/com/example/final_project/CalcActivity.java b/app/src/main/java/com/example/final_project/CalcActivity.java new file mode 100644 index 0000000..0b7039a --- /dev/null +++ b/app/src/main/java/com/example/final_project/CalcActivity.java @@ -0,0 +1,108 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.MenuItem; +import android.view.View; +import android.widget.*; + +public class CalcActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_calc); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + Button AddBtn=(Button)findViewById(R.id.AddBtn); + AddBtn.setOnClickListener(new View.OnClickListener() + { + @Override + public void onClick(View v) { + + EditText FirstEditText = (EditText) findViewById(R.id.FirstEditText); + EditText SecondEditText = (EditText) findViewById(R.id.SecondEditText); + TextView ResultTextView = (TextView) findViewById(R.id.ResultTextView); + + int num1 = Integer.parseInt(FirstEditText.getText().toString()); + int num2 = Integer.parseInt(SecondEditText.getText().toString()); + int result = num1 + num2; + + ResultTextView.setText(result + ""); //Output results + + + } + }); + + Button SubBtn=(Button)findViewById(R.id.SubBtn); + SubBtn.setOnClickListener(new View.OnClickListener() + { + @Override + public void onClick(View v) { + + EditText FirstEditText = (EditText) findViewById(R.id.FirstEditText); + EditText SecondEditText = (EditText) findViewById(R.id.SecondEditText); + TextView ResultTextView = (TextView) findViewById(R.id.ResultTextView); + + int num1 = Integer.parseInt(FirstEditText.getText().toString()); + int num2 = Integer.parseInt(SecondEditText.getText().toString()); + int result = num1 - num2; + + ResultTextView.setText(result + ""); //Output results + + } + }); + + Button MultBtn=(Button)findViewById(R.id.MultBtn); + MultBtn.setOnClickListener(new View.OnClickListener() + { + @Override + public void onClick(View v) { + + EditText FirstEditText = (EditText) findViewById(R.id.FirstEditText); + EditText SecondEditText = (EditText) findViewById(R.id.SecondEditText); + TextView ResultTextView = (TextView) findViewById(R.id.ResultTextView); + + int num1 = Integer.parseInt(FirstEditText.getText().toString()); + int num2 = Integer.parseInt(SecondEditText.getText().toString()); + int result = num1 * num2; + + ResultTextView.setText(result + ""); //Output results + + } + }); + + Button DivBtn=(Button)findViewById(R.id.DivBtn); + DivBtn.setOnClickListener(new View.OnClickListener() + { + @Override + public void onClick(View v) { + + EditText FirstEditText = (EditText) findViewById(R.id.FirstEditText); + EditText SecondEditText = (EditText) findViewById(R.id.SecondEditText); + TextView ResultTextView = (TextView) findViewById(R.id.ResultTextView); + + int num1 = Integer.parseInt(FirstEditText.getText().toString()); + int num2 = Integer.parseInt(SecondEditText.getText().toString()); + int result = num1 / num2; + + ResultTextView.setText(result + ""); //Output results + + } + }); + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } +} + diff --git a/app/src/main/java/com/example/final_project/ImageAdapter.java b/app/src/main/java/com/example/final_project/ImageAdapter.java new file mode 100644 index 0000000..d64e4cd --- /dev/null +++ b/app/src/main/java/com/example/final_project/ImageAdapter.java @@ -0,0 +1,42 @@ +package com.example.final_project; + +import android.content.Context; +import android.support.v4.view.PagerAdapter; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; + +public class ImageAdapter extends PagerAdapter { + + private Context mContext; + private int[] mImageIds=new int[] {R.drawable.redvalley1,R.drawable.redvalley2,R.drawable.redvalley3,R.drawable.redvalley4,R.drawable.redvalley5}; + + ImageAdapter(Context context){ + mContext=context; + } + + @Override + public int getCount() { + return mImageIds.length; + } + + @Override + public boolean isViewFromObject(View view, Object object) { + return view==object; + } + + @Override + public Object instantiateItem(ViewGroup container, int position) { + ImageView imageView=new ImageView(mContext); + imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); + imageView.setImageResource(mImageIds[position]); + container.addView(imageView,0); + return imageView; + + } + + @Override + public void destroyItem(ViewGroup container,int position,Object object) { + container.removeView((ImageView) object); + } +} diff --git a/app/src/main/java/com/example/final_project/ItemAdapter.java b/app/src/main/java/com/example/final_project/ItemAdapter.java new file mode 100644 index 0000000..3b11140 --- /dev/null +++ b/app/src/main/java/com/example/final_project/ItemAdapter.java @@ -0,0 +1,59 @@ +package com.example.final_project; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +public class ItemAdapter extends BaseAdapter{ + + LayoutInflater mInflater; + String[] items; + String[] prices; + String[] descriptions; + + public ItemAdapter(Context c, String[] i, String[] p, String[] d) { + + items=i; + prices=p; + descriptions=d; + mInflater=(LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + } + + @Override + public int getCount() { + return items.length; + } + + @Override + public Object getItem(int i) { + return items[i]; + } + + @Override + public long getItemId(int i) { + return i; + } + + @Override + public View getView(int i, View convertView, ViewGroup parent) { + + View v=mInflater.inflate(R.layout.my_listview_detail,null); + TextView nameTextView=(TextView)v.findViewById(R.id.nameTextView); + TextView descriptionTextView=(TextView)v.findViewById(R.id.descriptionTextView); + TextView priceTextView=(TextView)v.findViewById(R.id.priceTextView); + + String name=items[i]; + String desc=descriptions[i]; + String cost=prices[i]; + + nameTextView.setText(name); + descriptionTextView.setText(desc); + priceTextView.setText(cost); + + return v; + } +} + diff --git a/app/src/main/java/com/example/final_project/LoginActivity.java b/app/src/main/java/com/example/final_project/LoginActivity.java new file mode 100644 index 0000000..1364e92 --- /dev/null +++ b/app/src/main/java/com/example/final_project/LoginActivity.java @@ -0,0 +1,60 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.*; +import android.content.Intent; +import android.view.MenuItem; + +public class LoginActivity extends AppCompatActivity { + + TextView text1; + TextView text2; + Button login2; + RadioButton radio1; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_login); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + text1=(TextView)findViewById(R.id.txt1); + text2=(TextView)findViewById(R.id.txt2); + login2=(Button)findViewById(R.id.button2); + radio1=(RadioButton)findViewById(R.id.radio1); + + Bundle bundle=getIntent().getExtras(); + String data1=bundle.getString("user"); + String data2=bundle.getString("number"); + + text1.setText(data1); + text2.setText(data2); + + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } + + public void movepage(View v) { + if (radio1.isChecked()) { + Intent next = new Intent(LoginActivity.this, MenuActivity.class); + startActivity(next); + } + else { + Toast.makeText(getBaseContext(), "Please click the circular button", Toast.LENGTH_SHORT).show(); + } + } +} + diff --git a/app/src/main/java/com/example/final_project/MainActivity.java b/app/src/main/java/com/example/final_project/MainActivity.java new file mode 100644 index 0000000..ad80fcd --- /dev/null +++ b/app/src/main/java/com/example/final_project/MainActivity.java @@ -0,0 +1,46 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.*; +import android.content.Intent; + +public class MainActivity extends AppCompatActivity { + + EditText username, password; + Button login; + ImageView image; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + username=(EditText)findViewById(R.id.name); + password=(EditText)findViewById(R.id.pass); + login=(Button)findViewById(R.id.button); + image=(ImageView)findViewById(R.id.imageView1); + } + + public void movepage(View v) { + String stname = username.getText().toString(); + String stpassword = password.getText().toString(); + + if (stname.equals("ryantkerr") && stpassword.equals("123456")) { + Intent next = new Intent(MainActivity.this, LoginActivity.class); + Bundle bundle = new Bundle(); + bundle.putString("user",stname); + bundle.putString("number",stpassword); + + next.putExtras(bundle); + startActivity(next); + } + else if (stname.equals("") || stpassword.equals("")) { + Toast.makeText(getBaseContext(), "Enter Username and Password", Toast.LENGTH_SHORT).show(); + } + else { + Toast.makeText(getBaseContext(), "Wrong Username and Password", Toast.LENGTH_SHORT).show(); + } + } +} diff --git a/app/src/main/java/com/example/final_project/MenuActivity.java b/app/src/main/java/com/example/final_project/MenuActivity.java new file mode 100644 index 0000000..a1dfb94 --- /dev/null +++ b/app/src/main/java/com/example/final_project/MenuActivity.java @@ -0,0 +1,55 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.MenuItem; +import android.view.View; +import android.widget.*; +import android.content.Intent; + +public class MenuActivity extends AppCompatActivity{ + + Button fsuweb, resmenu, photoalb, calc; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_menu); + + fsuweb=(Button)findViewById(R.id.goog1); + resmenu=(Button)findViewById(R.id.res1); + photoalb=(Button)findViewById(R.id.album1); + calc=(Button)findViewById(R.id.calc1); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } + + public void movepage_web(View v) { + Intent next = new Intent(MenuActivity.this, WebActivity.class); + startActivity(next); + } + public void movepage_res(View v) { + Intent next = new Intent(MenuActivity.this, RestActivity.class); + startActivity(next); + } + public void movepage_album(View v) { + Intent next = new Intent(MenuActivity.this, AlbumActivity.class); + startActivity(next); + } + public void movepage_calc(View v) { + Intent next = new Intent(MenuActivity.this, CalcActivity.class); + startActivity(next); + } +} diff --git a/app/src/main/java/com/example/final_project/RestActivity.java b/app/src/main/java/com/example/final_project/RestActivity.java new file mode 100644 index 0000000..7220d91 --- /dev/null +++ b/app/src/main/java/com/example/final_project/RestActivity.java @@ -0,0 +1,61 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.content.Intent; +import android.content.res.Resources; +import android.view.MenuItem; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ListView; + + +public class RestActivity extends AppCompatActivity { + + ListView myListView; + String[] items; + String[] prices; + String[] descriptions; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_rest); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + Resources res=getResources(); + myListView=(ListView)findViewById(R.id.myListView); + items=res.getStringArray(R.array.items); + prices=res.getStringArray(R.array.prices); + descriptions=res.getStringArray(R.array.descriptions); + + ItemAdapter itemAdapter=new ItemAdapter(this,items,prices,descriptions); + myListView.setAdapter(itemAdapter); + + myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int i, long l) { + Intent showDetailActivity=new Intent(getApplicationContext(),RestImageActivity.class); + + showDetailActivity.putExtra("com.example.menuapp.ITEM_INDEX",i); + + startActivity(showDetailActivity); + + } + }); + + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } +} diff --git a/app/src/main/java/com/example/final_project/RestImageActivity.java b/app/src/main/java/com/example/final_project/RestImageActivity.java new file mode 100644 index 0000000..2e6afa4 --- /dev/null +++ b/app/src/main/java/com/example/final_project/RestImageActivity.java @@ -0,0 +1,72 @@ +package com.example.final_project; + +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.Display; +import android.view.MenuItem; +import android.widget.ImageView; + +public class RestImageActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_restimage); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + Intent in=getIntent(); + int index=in.getIntExtra("com.example.menuapp.ITEM_INDEX",-1); + + if(index>-1) { + int pic=getImg(index); + ImageView img=(ImageView)findViewById(R.id.imageView); + scaleImg(img,pic); + } + } + + private int getImg(int index) { + switch (index) { + case 0:return R.drawable.hotandsoup; + case 1:return R.drawable.springrolls; + case 2:return R.drawable.grillingfish; + default:return-1; + } + } + + private void scaleImg(ImageView img,int pic) { + Display screen=getWindowManager().getDefaultDisplay(); + BitmapFactory.Options options=new BitmapFactory.Options(); + + options.inJustDecodeBounds=true; + BitmapFactory.decodeResource(getResources(),pic,options); + + int imgWidth=options.outWidth; + int screenWidth=screen.getWidth(); + + if(imgWidth>screenWidth){ + int ratio=Math.round((float)imgWidth/(float)screenWidth); + options.inSampleSize=ratio; + } + + options.inJustDecodeBounds=false; + Bitmap scaleImg=BitmapFactory.decodeResource(getResources(),pic,options); + img.setImageBitmap(scaleImg); + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } +} + diff --git a/app/src/main/java/com/example/final_project/WebActivity.java b/app/src/main/java/com/example/final_project/WebActivity.java new file mode 100644 index 0000000..e33e3d1 --- /dev/null +++ b/app/src/main/java/com/example/final_project/WebActivity.java @@ -0,0 +1,36 @@ +package com.example.final_project; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.MenuItem; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +public class WebActivity extends AppCompatActivity { + + private WebView webView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_web); + + //BackButton + getSupportActionBar().setDisplayShowHomeEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + webView = (WebView) findViewById(R.id.webview); + webView.setWebViewClient(new WebViewClient()); + webView.loadUrl("http://www.google.com"); + } + + //BackButton + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + if (id == android.R.id.home) { + this.finish(); + } + return super.onOptionsItemSelected(item); + } +} diff --git a/app/src/main/res/drawable-v24/grillingfish.jpg b/app/src/main/res/drawable-v24/grillingfish.jpg new file mode 100644 index 0000000..f920d0e Binary files /dev/null and b/app/src/main/res/drawable-v24/grillingfish.jpg differ diff --git a/app/src/main/res/drawable-v24/hotandsoup.jpg b/app/src/main/res/drawable-v24/hotandsoup.jpg new file mode 100644 index 0000000..4dbe902 Binary files /dev/null and b/app/src/main/res/drawable-v24/hotandsoup.jpg differ 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-v24/redvalley1.jpg b/app/src/main/res/drawable-v24/redvalley1.jpg new file mode 100644 index 0000000..3a3b7ec Binary files /dev/null and b/app/src/main/res/drawable-v24/redvalley1.jpg differ diff --git a/app/src/main/res/drawable-v24/redvalley2.jpg b/app/src/main/res/drawable-v24/redvalley2.jpg new file mode 100644 index 0000000..5ff6e97 Binary files /dev/null and b/app/src/main/res/drawable-v24/redvalley2.jpg differ diff --git a/app/src/main/res/drawable-v24/redvalley3.jpg b/app/src/main/res/drawable-v24/redvalley3.jpg new file mode 100644 index 0000000..6c004c5 Binary files /dev/null and b/app/src/main/res/drawable-v24/redvalley3.jpg differ diff --git a/app/src/main/res/drawable-v24/redvalley4.jpg b/app/src/main/res/drawable-v24/redvalley4.jpg new file mode 100644 index 0000000..d71fb82 Binary files /dev/null and b/app/src/main/res/drawable-v24/redvalley4.jpg differ diff --git a/app/src/main/res/drawable-v24/redvalley5.jpg b/app/src/main/res/drawable-v24/redvalley5.jpg new file mode 100644 index 0000000..a3aab40 Binary files /dev/null and b/app/src/main/res/drawable-v24/redvalley5.jpg differ diff --git a/app/src/main/res/drawable-v24/springrolls.jpg b/app/src/main/res/drawable-v24/springrolls.jpg new file mode 100644 index 0000000..febc506 Binary files /dev/null and b/app/src/main/res/drawable-v24/springrolls.jpg differ 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/new_hampshire.jpg b/app/src/main/res/drawable/new_hampshire.jpg new file mode 100755 index 0000000..fcfeb06 Binary files /dev/null and b/app/src/main/res/drawable/new_hampshire.jpg differ diff --git a/app/src/main/res/layout/activity_album.xml b/app/src/main/res/layout/activity_album.xml new file mode 100644 index 0000000..296510c --- /dev/null +++ b/app/src/main/res/layout/activity_album.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_calc.xml b/app/src/main/res/layout/activity_calc.xml new file mode 100644 index 0000000..c9d25de --- /dev/null +++ b/app/src/main/res/layout/activity_calc.xml @@ -0,0 +1,144 @@ + + + + + + + + + +