Skip to content

Commit

Permalink
Changed interface. Floating button added. Few other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tshradheya committed Jun 7, 2017
1 parent 83489c4 commit 8c029e0
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 66 deletions.
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/calendar"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@drawable/calendar"
android:supportsRtl="true"
android:theme="@style/Nustheme">
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Toolbar mToolBar = (Toolbar)findViewById(R.id.toolbar3);
setSupportActionBar(mToolBar);


}

Expand Down
Binary file added app/src/main/res/drawable-hdpi/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxxhdpi/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable/homescreen2.jpg
Binary file not shown.
91 changes: 44 additions & 47 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,86 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout 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"
tools:context="com.example.android.nusevents.MainActivity"
>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"

tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="0dp">
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

android:id="@+id/relativeLayout">

<ImageView
android:id="@+id/nushome"
android:layout_width="match_parent"
android:layout_height="370dp"
android:layout_weight="1"
android:src="@drawable/homescreen"
android:scaleType="centerCrop"
android:layout_marginTop="50dp"
/>

<Button
android:id="@+id/button"
<ImageView
android:id="@+id/nushome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="CREATE AN EVENT"
android:layout_centerHorizontal="true"
android:layout_above="@+id/buttontwo"
android:layout_marginTop="10dp"
android:layout_height="370dp"

android:src="@drawable/homescreen"
android:scaleType="centerCrop"
android:foregroundGravity="top"

android:textSize="20sp"
android:textStyle="bold"
android:background="#ffffff"
android:textColor="#000000"
/>

<Button
android:id="@+id/buttontwo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="VIEW EVENTS"
android:layout_height="56dp"
android:text="VIEW EVENTS @NUS"
android:layout_centerHorizontal="true"
android:background="#ffffff"
android:layout_above="@+id/buttonthree"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="#000000"
android:textColor="@color/colorPrimary"
android:backgroundTint="@color/colorPrimaryDark"
android:layout_below="@+id/nushome"
/>

<Button
android:id="@+id/buttonthree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="EVENTS INTERESTED IN"
android:layout_alignParentBottom="true"
android:layout_height="56dp"
android:text="YOUR BOOKMARKED EVENTS"
android:background="#ffffff"
android:layout_below="@+id/button2"
android:textSize="20sp"
android:textStyle="bold"

android:textColor="#000000"
android:textColor="@color/colorPrimary"
android:backgroundTint="@color/colorPrimaryDark"


/>
android:layout_below="@+id/buttontwo"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />



<android.support.v7.widget.Toolbar
android:id="@+id/toolbar3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
android:layout_centerHorizontal="true" />


</RelativeLayout>
</android.support.constraint.ConstraintLayout>

<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="center_vertical|left"
android:contentDescription="Add New Event"
android:elevation="20dp"
android:src="@android:drawable/ic_input_add"
app:fabSize="normal"
app:layout_anchor="@+id/relativeLayout"
app:layout_anchorGravity="bottom|right"
android:layout_marginBottom="8dp"
android:layout_marginRight="8dp"
android:clickable="true"


/>
</android.support.design.widget.CoordinatorLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimary">#FF5722</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorAccent">#FF3D00</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">NusEvents</string>
<string name="app_name">NUSEvents</string>
</resources>
11 changes: 0 additions & 11 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,4 @@
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="Nustheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#FF5722</item>
<item name="colorPrimaryDark">#01579B</item>

<item name="android:navigationBarColor">#01579B</item>
<item name="android:actionBarTabTextStyle">@style/Base.TextAppearance.AppCompat</item>


</style>

</resources>

0 comments on commit 8c029e0

Please sign in to comment.