Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:label="Simple Calculator"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Splash"
android:theme="@style/AppTheme.NoActionBar"></activity>

</application>

</manifest>
27 changes: 23 additions & 4 deletions app/src/main/java/tech/iosd/calculaterhacktober/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
Expand Down Expand Up @@ -260,9 +262,26 @@ public void onClick(View view) {
});

}
// public void scientific(View view)
// {
// startActivity(new Intent(this,scientificCalc.class));
// }

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.mainmenu, menu);
return super.onCreateOptionsMenu(menu);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {

switch (item.getItemId()){
case R.id.ac_scientific:

break;

case R.id.ac_about:
break;
}

return super.onOptionsItemSelected(item);
}
}

25 changes: 25 additions & 0 deletions app/src/main/java/tech/iosd/calculaterhacktober/Splash.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package tech.iosd.calculaterhacktober;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Splash extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
startActivity(new Intent(
Splash.this, MainActivity.class
));
}
}, 1500);
}
}
Binary file added app/src/main/res/drawable/a.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundColor"
android:orientation="vertical"

tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="0dp">

<LinearLayout
android:background="#11000000"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
Expand Down Expand Up @@ -42,6 +42,7 @@
</LinearLayout>

<LinearLayout
android:background="#33000000"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.75"
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:background="@drawable/a"
android:gravity="center"
android:orientation="vertical"
tools:context="tech.iosd.calculaterhacktober.Splash">

<TextView
android:text="CALCULATE"
android:textColor="#fff"
android:background="#99000000"
android:textAlignment="center"
android:textSize="60sp"
android:fontFamily="serif-monospace"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>
11 changes: 11 additions & 0 deletions app/src/main/res/menu/mainmenu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/ac_scientific"
android:title="Scientific Operations"/>
<item
android:id="@+id/ac_about"
android:title="About Us"/>

</menu>
6 changes: 6 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>