Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
6f65f780
Commit
6f65f780
authored
Jun 29, 2017
by
Mrunzzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add event and other minor changes
parent
c91d5308
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
240 additions
and
1 deletion
+240
-1
.idea/modules.xml
.idea/modules.xml
+0
-1
app/build.gradle
app/build.gradle
+2
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/AddEventFragment.java
.../ac/iitb/gymkhana/iitbapp/fragments/AddEventFragment.java
+85
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
.../ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
+17
-0
app/src/main/res/layout/fragment_add_event.xml
app/src/main/res/layout/fragment_add_event.xml
+125
-0
app/src/main/res/layout/fragment_calendar.xml
app/src/main/res/layout/fragment_calendar.xml
+10
-0
app/src/main/res/values/drawables.xml
app/src/main/res/values/drawables.xml
+1
-0
No files found.
.idea/modules.xml
View file @
6f65f780
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
<component
name=
"ProjectModuleManager"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/IITB-App.iml"
filepath=
"$PROJECT_DIR$/IITB-App.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/IITB-App.iml"
filepath=
"$PROJECT_DIR$/IITB-App.iml"
/>
<module
fileurl=
"file://D:\IITB-App\IITBApp.iml"
filepath=
"D:\IITB-App\IITBApp.iml"
/>
<module
fileurl=
"file://D:\IITB-App\IITBApp.iml"
filepath=
"D:\IITB-App\IITBApp.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
</modules>
</modules>
...
...
app/build.gradle
View file @
6f65f780
...
@@ -33,4 +33,6 @@ dependencies {
...
@@ -33,4 +33,6 @@ dependencies {
compile
'com.google.android.gms:play-services-maps:10.2.6'
compile
'com.google.android.gms:play-services-maps:10.2.6'
compile
'com.android.support.constraint:constraint-layout:1.0.2'
compile
'com.android.support.constraint:constraint-layout:1.0.2'
compile
'com.android.support:support-v4:25.3.1'
compile
'com.android.support:support-v4:25.3.1'
compile
'com.jakewharton:butterknife:8.6.0'
annotationProcessor
'com.jakewharton:butterknife-compiler:8.6.0'
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/AddEventFragment.java
0 → 100644
View file @
6f65f780
package
in.ac.iitb.gymkhana.iitbapp.fragments
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.database.Cursor
;
import
android.media.Image
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.AppCompatCheckBox
;
import
android.support.v7.widget.PopupMenu
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.CheckBox
;
import
android.widget.EditText
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
import
static
android
.
app
.
Activity
.
RESULT_OK
;
import
static
android
.
content
.
ContentValues
.
TAG
;
import
static
android
.
view
.
View
.
VISIBLE
;
public
class
AddEventFragment
extends
Fragment
{
@BindView
(
R
.
id
.
button_createEvent
)
Button
createEvent
;
@BindView
(
R
.
id
.
cb_public
)
CheckBox
publicCheckBox
;
@BindView
(
R
.
id
.
et_date
)
EditText
date
;
@BindView
(
R
.
id
.
et_time
)
EditText
time
;
@BindView
(
R
.
id
.
et_venue
)
EditText
venue
;
@BindView
(
R
.
id
.
et_eventDetails
)
EditText
details
;
@BindView
(
R
.
id
.
iv_eventImage
)
ImageView
eventImage
;
@BindView
(
R
.
id
.
ib_eventImage
)
ImageButton
imageButton
;
View
view
;
public
AddEventFragment
()
{
// Required empty public constructor
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
container
.
removeAllViews
();
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_add_event
,
container
,
false
);
ButterKnife
.
bind
(
this
,
view
);
imageButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Toast
.
makeText
(
getContext
(),
"Add Image"
,
Toast
.
LENGTH_SHORT
).
show
();
//TODO (1) upload image to server
}
});
createEvent
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Toast
.
makeText
(
getContext
(),
"Add Event"
,
Toast
.
LENGTH_SHORT
).
show
();
//TODO (2) save event
}
});
return
view
;
}
//TODO(3) configure onBackPressed
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
View file @
6f65f780
...
@@ -2,7 +2,9 @@ package in.ac.iitb.gymkhana.iitbapp.fragments;
...
@@ -2,7 +2,9 @@ package in.ac.iitb.gymkhana.iitbapp.fragments;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentTransaction
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -18,6 +20,7 @@ public class CalendarFragment extends Fragment {
...
@@ -18,6 +20,7 @@ public class CalendarFragment extends Fragment {
private
View
view
;
private
View
view
;
private
Toast
toast
;
private
Toast
toast
;
FloatingActionButton
fab
;
public
CalendarFragment
()
{
public
CalendarFragment
()
{
// Required empty public constructor
// Required empty public constructor
...
@@ -28,7 +31,9 @@ public class CalendarFragment extends Fragment {
...
@@ -28,7 +31,9 @@ public class CalendarFragment extends Fragment {
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
// Inflate the layout for this fragment
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_calendar
,
container
,
false
);
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_calendar
,
container
,
false
);
fab
=(
FloatingActionButton
)
view
.
findViewById
(
R
.
id
.
fab
);
final
CalendarView
simpleCalendarView
=
(
CalendarView
)
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
// get the reference of CalendarView
final
CalendarView
simpleCalendarView
=
(
CalendarView
)
view
.
findViewById
(
R
.
id
.
simpleCalendarView
);
// get the reference of CalendarView
simpleCalendarView
.
setFirstDayOfWeek
(
1
);
// set Sunday as the first day of the week
simpleCalendarView
.
setFirstDayOfWeek
(
1
);
// set Sunday as the first day of the week
...
@@ -47,6 +52,18 @@ public class CalendarFragment extends Fragment {
...
@@ -47,6 +52,18 @@ public class CalendarFragment extends Fragment {
}
}
});
});
fab
.
setOnClickListener
(
new
View
.
OnClickListener
(){
@Override
public
void
onClick
(
View
v
)
{
AddEventFragment
addEventFragment
=
new
AddEventFragment
();
FragmentTransaction
ft
=
getChildFragmentManager
().
beginTransaction
();
ft
.
replace
(
R
.
id
.
calendar_layout
,
addEventFragment
);
ft
.
addToBackStack
(
"addEvent"
);
ft
.
commit
();
}
});
return
view
;
return
view
;
}
}
...
...
app/src/main/res/layout/fragment_add_event.xml
0 → 100644
View file @
6f65f780
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
"in.ac.iitb.gymkhana.iitbapp.fragments.AddEventFragment"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/iv_eventImage"
android:background=
"#EEEEEE"
/>
<ImageButton
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/ic_input_add"
android:background=
"#EEEEEE"
android:id=
"@+id/ib_eventImage"
/>
</RelativeLayout>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/et_eventName"
android:padding=
"16dp"
android:hint=
"Event Name"
android:paddingBottom=
"16dp"
android:background=
"#81d2cb"
android:textColorHint=
"#FFFFFF"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:orientation=
"horizontal"
android:layout_marginTop=
"10dp"
android:layout_marginLeft=
"16dp"
android:layout_marginRight=
"16dp"
android:layout_height=
"40dp"
>
<EditText
android:layout_width=
"wrap_content"
android:paddingRight=
"6dp"
android:paddingLeft=
"6dp"
android:layout_height=
"match_parent"
android:id=
"@+id/et_date"
android:hint=
"Date"
/>
<View
android:layout_width=
"3dp"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:background=
"@color/common_google_signin_btn_text_dark_disabled"
/>
<EditText
android:layout_width=
"wrap_content"
android:paddingRight=
"6dp"
android:paddingLeft=
"6dp"
android:layout_height=
"match_parent"
android:id=
"@+id/et_time"
android:hint=
"Time"
/>
<View
android:layout_width=
"3dp"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:background=
"@color/common_google_signin_btn_text_dark_disabled"
/>
<EditText
android:layout_width=
"wrap_content"
android:paddingRight=
"6dp"
android:paddingLeft=
"6dp"
android:layout_height=
"match_parent"
android:id=
"@+id/et_venue"
android:hint=
"Venue"
/>
</LinearLayout>
<EditText
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:gravity=
"top"
android:hint=
"Details"
android:layout_weight=
"1"
android:id=
"@+id/et_eventDetails"
android:paddingLeft=
"6dp"
android:paddingRight=
"6dp"
android:layout_marginLeft=
"16dp"
android:layout_marginRight=
"16dp"
android:layout_marginTop=
"8dp"
android:background=
"#E0E0E0"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Public"
android:textSize=
"18sp"
android:layout_marginLeft=
"8dp"
android:paddingLeft=
"8dp"
/>
<CheckBox
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:id=
"@+id/cb_public"
android:layout_marginRight=
"10dp"
/>
</RelativeLayout>
<Button
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:background=
"@color/colorAccent"
android:text=
"Create"
android:id=
"@+id/button_createEvent"
android:gravity=
"center"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_calendar.xml
View file @
6f65f780
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#E0E0E0"
android:background=
"#E0E0E0"
android:id=
"@+id/calendar_layout"
android:theme=
"@style/CalendarTheme"
>
android:theme=
"@style/CalendarTheme"
>
...
@@ -38,5 +39,14 @@
...
@@ -38,5 +39,14 @@
android:gravity=
"center"
android:gravity=
"center"
android:text=
"# Events Today"
/>
android:text=
"# Events Today"
/>
<android.support.design.widget.FloatingActionButton
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentBottom=
"true"
android:id=
"@+id/fab"
android:layout_margin=
"16dp"
android:src=
"@android:drawable/ic_input_add"
/>
</RelativeLayout>
</RelativeLayout>
app/src/main/res/values/drawables.xml
View file @
6f65f780
...
@@ -5,4 +5,5 @@
...
@@ -5,4 +5,5 @@
<item
name=
"ic_menu_manage"
type=
"drawable"
>
@android:drawable/ic_menu_manage
</item>
<item
name=
"ic_menu_manage"
type=
"drawable"
>
@android:drawable/ic_menu_manage
</item>
<item
name=
"ic_menu_share"
type=
"drawable"
>
@android:drawable/ic_menu_share
</item>
<item
name=
"ic_menu_share"
type=
"drawable"
>
@android:drawable/ic_menu_share
</item>
<item
name=
"ic_menu_send"
type=
"drawable"
>
@android:drawable/ic_menu_send
</item>
<item
name=
"ic_menu_send"
type=
"drawable"
>
@android:drawable/ic_menu_send
</item>
<item
name=
"ic_input_add"
type=
"drawable"
>
@android:drawable/ic_input_add
</item>
</resources>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment