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
ce795c34
Commit
ce795c34
authored
Feb 03, 2019
by
Varun Patil
Committed by
GitHub
Feb 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #269 from wncc/patch17
Minor bug fixes/tweaks
parents
078e5574
e80e0e80
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
269 additions
and
202 deletions
+269
-202
app/build.gradle
app/build.gradle
+2
-2
app/src/main/java/app/insti/Utils.java
app/src/main/java/app/insti/Utils.java
+1
-1
app/src/main/java/app/insti/activity/MainActivity.java
app/src/main/java/app/insti/activity/MainActivity.java
+1
-1
app/src/main/java/app/insti/fragment/AddEventFragment.java
app/src/main/java/app/insti/fragment/AddEventFragment.java
+2
-2
app/src/main/java/app/insti/fragment/CalendarFragment.java
app/src/main/java/app/insti/fragment/CalendarFragment.java
+11
-1
app/src/main/java/app/insti/fragment/EventFragment.java
app/src/main/java/app/insti/fragment/EventFragment.java
+39
-1
app/src/main/java/app/insti/fragment/SettingsFragment.java
app/src/main/java/app/insti/fragment/SettingsFragment.java
+5
-0
app/src/main/java/app/insti/fragment/UserFragment.java
app/src/main/java/app/insti/fragment/UserFragment.java
+4
-4
app/src/main/res/anim/fade_in.xml
app/src/main/res/anim/fade_in.xml
+2
-2
app/src/main/res/anim/fade_out.xml
app/src/main/res/anim/fade_out.xml
+2
-2
app/src/main/res/anim/slide_in_up.xml
app/src/main/res/anim/slide_in_up.xml
+2
-2
app/src/main/res/anim/slide_out_down.xml
app/src/main/res/anim/slide_out_down.xml
+2
-2
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_main.xml
+2
-1
app/src/main/res/layout/fragment_body.xml
app/src/main/res/layout/fragment_body.xml
+6
-6
app/src/main/res/layout/fragment_event.xml
app/src/main/res/layout/fragment_event.xml
+176
-158
app/src/main/res/layout/fragment_user.xml
app/src/main/res/layout/fragment_user.xml
+12
-17
No files found.
app/build.gradle
View file @
ce795c34
...
@@ -8,8 +8,8 @@ android {
...
@@ -8,8 +8,8 @@ android {
manifestPlaceholders
'appAuthRedirectScheme'
:
'https'
manifestPlaceholders
'appAuthRedirectScheme'
:
'https'
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
28
targetSdkVersion
28
versionCode
2
6
versionCode
2
7
versionName
"1.3.
1
"
versionName
"1.3.
2
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
}
}
...
...
app/src/main/java/app/insti/Utils.java
View file @
ce795c34
...
@@ -82,7 +82,7 @@ public final class Utils {
...
@@ -82,7 +82,7 @@ public final class Utils {
*/
*/
public
static
final
void
updateFragment
(
Fragment
fragment
,
FragmentActivity
fragmentActivity
)
{
public
static
final
void
updateFragment
(
Fragment
fragment
,
FragmentActivity
fragmentActivity
)
{
FragmentTransaction
ft
=
fragmentActivity
.
getSupportFragmentManager
().
beginTransaction
();
FragmentTransaction
ft
=
fragmentActivity
.
getSupportFragmentManager
().
beginTransaction
();
ft
.
setCustomAnimations
(
R
.
anim
.
slide_in_
left
,
R
.
anim
.
slide_out_left
,
R
.
anim
.
slide_in_right
,
R
.
anim
.
slide_out_right
);
ft
.
setCustomAnimations
(
R
.
anim
.
slide_in_
up
,
R
.
anim
.
fade_out
,
R
.
anim
.
fade_in
,
R
.
anim
.
slide_out_down
);
ft
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
ft
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
ft
.
addToBackStack
(
fragment
.
getTag
());
ft
.
addToBackStack
(
fragment
.
getTag
());
ft
.
commit
();
ft
.
commit
();
...
...
app/src/main/java/app/insti/activity/MainActivity.java
View file @
ce795c34
...
@@ -645,7 +645,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -645,7 +645,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
/* Animate only for UserFragment */
/* Animate only for UserFragment */
if
(
fragment
instanceof
UserFragment
)
{
if
(
fragment
instanceof
UserFragment
)
{
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
left
,
R
.
anim
.
slide_out_left
,
R
.
anim
.
slide_in_right
,
R
.
anim
.
slide_out_right
);
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
up
,
R
.
anim
.
fade_out
,
R
.
anim
.
fade_in
,
R
.
anim
.
slide_out_down
);
}
}
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
...
...
app/src/main/java/app/insti/fragment/AddEventFragment.java
View file @
ce795c34
...
@@ -146,7 +146,7 @@ public class AddEventFragment extends BaseFragment {
...
@@ -146,7 +146,7 @@ public class AddEventFragment extends BaseFragment {
eventFragment
.
setArguments
(
bundle
);
eventFragment
.
setArguments
(
bundle
);
FragmentManager
manager
=
getActivity
().
getSupportFragmentManager
();
FragmentManager
manager
=
getActivity
().
getSupportFragmentManager
();
FragmentTransaction
transaction
=
manager
.
beginTransaction
();
FragmentTransaction
transaction
=
manager
.
beginTransaction
();
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
left
,
R
.
anim
.
slide_out_left
,
R
.
anim
.
slide_in_right
,
R
.
anim
.
slide_out_right
);
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
up
,
R
.
anim
.
fade_out
,
R
.
anim
.
fade_in
,
R
.
anim
.
slide_out_down
);
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
eventFragment
,
eventFragment
.
getTag
());
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
eventFragment
,
eventFragment
.
getTag
());
transaction
.
addToBackStack
(
eventFragment
.
getTag
()).
commit
();
transaction
.
addToBackStack
(
eventFragment
.
getTag
()).
commit
();
}
}
...
@@ -155,7 +155,7 @@ public class AddEventFragment extends BaseFragment {
...
@@ -155,7 +155,7 @@ public class AddEventFragment extends BaseFragment {
BodyFragment
bodyFragment
=
BodyFragment
.
newInstance
(
body
);
BodyFragment
bodyFragment
=
BodyFragment
.
newInstance
(
body
);
FragmentManager
manager
=
getActivity
().
getSupportFragmentManager
();
FragmentManager
manager
=
getActivity
().
getSupportFragmentManager
();
FragmentTransaction
transaction
=
manager
.
beginTransaction
();
FragmentTransaction
transaction
=
manager
.
beginTransaction
();
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
left
,
R
.
anim
.
slide_out_left
,
R
.
anim
.
slide_in_right
,
R
.
anim
.
slide_out_right
);
transaction
.
setCustomAnimations
(
R
.
anim
.
slide_in_
up
,
R
.
anim
.
fade_out
,
R
.
anim
.
fade_in
,
R
.
anim
.
slide_out_down
);
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
bodyFragment
,
bodyFragment
.
getTag
());
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
bodyFragment
,
bodyFragment
.
getTag
());
transaction
.
addToBackStack
(
bodyFragment
.
getTag
()).
commit
();
transaction
.
addToBackStack
(
bodyFragment
.
getTag
()).
commit
();
}
}
...
...
app/src/main/java/app/insti/fragment/CalendarFragment.java
View file @
ce795c34
...
@@ -4,6 +4,7 @@ package app.insti.fragment;
...
@@ -4,6 +4,7 @@ package app.insti.fragment;
import
android.animation.ArgbEvaluator
;
import
android.animation.ArgbEvaluator
;
import
android.graphics.drawable.GradientDrawable
;
import
android.graphics.drawable.GradientDrawable
;
import
android.graphics.drawable.InsetDrawable
;
import
android.graphics.drawable.InsetDrawable
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.FloatingActionButton
;
...
@@ -171,10 +172,19 @@ public class CalendarFragment extends BaseFragment {
...
@@ -171,10 +172,19 @@ public class CalendarFragment extends BaseFragment {
@Override
@Override
public
void
decorate
(
DayViewFacade
view
)
{
public
void
decorate
(
DayViewFacade
view
)
{
// Color background with alpha
GradientDrawable
gD
=
new
GradientDrawable
();
GradientDrawable
gD
=
new
GradientDrawable
();
gD
.
setColor
((
int
)
new
ArgbEvaluator
().
evaluate
(((
float
)
alpha
/
255.0f
),
white
,
color
));
gD
.
setColor
((
int
)
new
ArgbEvaluator
().
evaluate
(((
float
)
alpha
/
255.0f
),
white
,
color
));
gD
.
setShape
(
GradientDrawable
.
OVAL
);
gD
.
setShape
(
GradientDrawable
.
OVAL
);
InsetDrawable
iD
=
new
InsetDrawable
(
gD
,
15
);
// Inset to show border on selected
InsetDrawable
iD
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
iD
=
new
InsetDrawable
(
gD
,
0.1f
);
}
else
{
iD
=
new
InsetDrawable
(
gD
,
10
);
}
view
.
setBackgroundDrawable
(
iD
);
view
.
setBackgroundDrawable
(
iD
);
}
}
}
}
...
...
app/src/main/java/app/insti/fragment/EventFragment.java
View file @
ce795c34
...
@@ -12,6 +12,8 @@ import android.graphics.Rect;
...
@@ -12,6 +12,8 @@ import android.graphics.Rect;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.design.widget.AppBarLayout
;
import
android.support.design.widget.CoordinatorLayout
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.widget.NestedScrollView
;
import
android.support.v4.widget.NestedScrollView
;
...
@@ -73,6 +75,7 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -73,6 +75,7 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
ImageButton
shareEventButton
;
ImageButton
shareEventButton
;
RecyclerView
bodyRecyclerView
;
RecyclerView
bodyRecyclerView
;
String
TAG
=
"EventFragment"
;
String
TAG
=
"EventFragment"
;
int
appBarOffset
=
0
;
// Hold a reference to the current animator,
// Hold a reference to the current animator,
// so that it can be canceled mid-way.
// so that it can be canceled mid-way.
...
@@ -144,7 +147,7 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -144,7 +147,7 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
Bundle
bundle
=
getArguments
();
Bundle
bundle
=
getArguments
();
String
eventJson
=
bundle
.
getString
(
Constants
.
EVENT_JSON
);
String
eventJson
=
bundle
.
getString
(
Constants
.
EVENT_JSON
);
Log
.
d
(
TAG
,
"onStart: "
+
eventJson
);
event
=
new
Gson
().
fromJson
(
eventJson
,
Event
.
class
);
event
=
new
Gson
().
fromJson
(
eventJson
,
Event
.
class
);
inflateViews
(
event
);
inflateViews
(
event
);
...
@@ -154,6 +157,41 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
...
@@ -154,6 +157,41 @@ public class EventFragment extends BackHandledFragment implements TransitionTarg
if
(
bundle
.
getBoolean
(
Constants
.
NO_SHARED_ELEM
,
true
))
{
if
(
bundle
.
getBoolean
(
Constants
.
NO_SHARED_ELEM
,
true
))
{
this
.
transitionEnd
();
this
.
transitionEnd
();
}
}
setupAppBarLayout
();
}
/** Initialize app bar layout */
private
void
setupAppBarLayout
()
{
// Set the behavior
AppBarLayout
mAppBarLayout
=
getView
().
findViewById
(
R
.
id
.
appBar
);
((
CoordinatorLayout
.
LayoutParams
)
mAppBarLayout
.
getLayoutParams
()).
setBehavior
(
new
AppBarLayout
.
Behavior
());
// Set offset on init
mAppBarLayout
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
setAppBarOffset
(
appBarOffset
);
}
});
// Store offset for next init
mAppBarLayout
.
addOnOffsetChangedListener
(
new
AppBarLayout
.
OnOffsetChangedListener
()
{
@Override
public
void
onOffsetChanged
(
AppBarLayout
appBarLayout
,
int
i
)
{
if
(
i
!=
0
)
appBarOffset
=
-
i
;
}
});
}
/** Set appbar to have an offset */
private
void
setAppBarOffset
(
int
offsetPx
){
AppBarLayout
mAppBarLayout
=
getView
().
findViewById
(
R
.
id
.
appBar
);
CoordinatorLayout
mCoordinatorLayour
=
getView
().
findViewById
(
R
.
id
.
coordinator
);
CoordinatorLayout
.
LayoutParams
params
=
(
CoordinatorLayout
.
LayoutParams
)
mAppBarLayout
.
getLayoutParams
();
AppBarLayout
.
Behavior
behavior
=
(
AppBarLayout
.
Behavior
)
params
.
getBehavior
();
if
(
behavior
==
null
)
return
;
behavior
.
onNestedPreScroll
(
mCoordinatorLayour
,
mAppBarLayout
,
null
,
0
,
offsetPx
,
new
int
[]{
0
,
0
},
0
);
}
}
private
void
inflateViews
(
final
Event
event
)
{
private
void
inflateViews
(
final
Event
event
)
{
...
...
app/src/main/java/app/insti/fragment/SettingsFragment.java
View file @
ce795c34
...
@@ -41,6 +41,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
...
@@ -41,6 +41,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
return
false
;
return
false
;
}
}
});
});
showContactPref
.
setEnabled
(
false
);
// Update Profile
// Update Profile
profilePref
=
findPreference
(
"profile"
);
profilePref
=
findPreference
(
"profile"
);
...
@@ -109,8 +110,10 @@ public class SettingsFragment extends PreferenceFragmentCompat {
...
@@ -109,8 +110,10 @@ public class SettingsFragment extends PreferenceFragmentCompat {
@Override
@Override
public
void
onResponse
(
Call
<
User
>
call
,
Response
<
User
>
response
)
{
public
void
onResponse
(
Call
<
User
>
call
,
Response
<
User
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
User
user
=
response
.
body
();
User
user
=
response
.
body
();
showContactPref
.
setChecked
(
user
.
getShowContactNumber
());
showContactPref
.
setChecked
(
user
.
getShowContactNumber
());
showContactPref
.
setEnabled
(
true
);
}
}
}
}
});
});
...
@@ -124,6 +127,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
...
@@ -124,6 +127,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
retrofitInterface
.
patchUserMe
(
Utils
.
getSessionIDHeader
(),
new
UserShowContactPatchRequest
(
isChecked
)).
enqueue
(
new
Callback
<
User
>()
{
retrofitInterface
.
patchUserMe
(
Utils
.
getSessionIDHeader
(),
new
UserShowContactPatchRequest
(
isChecked
)).
enqueue
(
new
Callback
<
User
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
User
>
call
,
Response
<
User
>
response
)
{
public
void
onResponse
(
Call
<
User
>
call
,
Response
<
User
>
response
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
showContactPref
.
setChecked
(
isChecked
);
showContactPref
.
setChecked
(
isChecked
);
showContactPref
.
setEnabled
(
true
);
showContactPref
.
setEnabled
(
true
);
...
@@ -135,6 +139,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
...
@@ -135,6 +139,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
@Override
@Override
public
void
onFailure
(
Call
<
User
>
call
,
Throwable
t
)
{
public
void
onFailure
(
Call
<
User
>
call
,
Throwable
t
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
showContactPref
.
setChecked
(!
isChecked
);
showContactPref
.
setChecked
(!
isChecked
);
showContactPref
.
setEnabled
(
true
);
showContactPref
.
setEnabled
(
true
);
}
}
...
...
app/src/main/java/app/insti/fragment/UserFragment.java
View file @
ce795c34
...
@@ -11,6 +11,7 @@ import android.graphics.Point;
...
@@ -11,6 +11,7 @@ import android.graphics.Point;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.design.widget.FloatingActionButton
;
import
android.support.design.widget.TabLayout
;
import
android.support.design.widget.TabLayout
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.view.ViewPager
;
import
android.support.v4.view.ViewPager
;
...
@@ -19,7 +20,6 @@ import android.view.LayoutInflater;
...
@@ -19,7 +20,6 @@ import android.view.LayoutInflater;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.view.animation.DecelerateInterpolator
;
import
android.view.animation.DecelerateInterpolator
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -150,7 +150,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
...
@@ -150,7 +150,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
TextView
userRollNumberTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_rollno_profile
);
TextView
userRollNumberTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_rollno_profile
);
final
TextView
userEmailIDTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_email_profile
);
final
TextView
userEmailIDTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_email_profile
);
TextView
userContactNumberTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_contact_no_profile
);
TextView
userContactNumberTextView
=
getActivity
().
findViewById
(
R
.
id
.
user_contact_no_profile
);
ImageButton
userShareImageButton
=
getActivity
().
findViewById
(
R
.
id
.
share_user_button
);
FloatingActionButton
userShareFab
=
getActivity
().
findViewById
(
R
.
id
.
share_user_button
);
Picasso
.
get
()
Picasso
.
get
()
.
load
(
user
.
getUserProfilePictureUrl
())
.
load
(
user
.
getUserProfilePictureUrl
())
...
@@ -229,7 +229,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
...
@@ -229,7 +229,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
});
});
}
}
userShare
ImageButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
userShare
Fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
String
shareUrl
=
ShareURLMaker
.
getUserURL
(
user
);
String
shareUrl
=
ShareURLMaker
.
getUserURL
(
user
);
@Override
@Override
...
@@ -241,7 +241,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
...
@@ -241,7 +241,7 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
startActivity
(
Intent
.
createChooser
(
i
,
"Share URL"
));
startActivity
(
Intent
.
createChooser
(
i
,
"Share URL"
));
}
}
});
});
userShare
ImageButton
.
setVisibility
(
VISIBLE
);
userShare
Fab
.
show
(
);
}
}
private
void
call
(
String
contactNumber
)
{
private
void
call
(
String
contactNumber
)
{
...
...
app/src/main/res/anim/
slide_out_left
.xml
→
app/src/main/res/anim/
fade_in
.xml
View file @
ce795c34
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<set>
<set>
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"400"
android:duration=
"400"
android:propertyName=
"
x
"
android:propertyName=
"
alpha
"
android:valueFrom=
"0"
android:valueFrom=
"0"
android:valueTo=
"
-1280
"
android:valueTo=
"
1
"
android:valueType=
"floatType"
/>
android:valueType=
"floatType"
/>
</set>
</set>
\ No newline at end of file
app/src/main/res/anim/
slide_in_righ
t.xml
→
app/src/main/res/anim/
fade_ou
t.xml
View file @
ce795c34
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<set>
<set>
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"400"
android:duration=
"400"
android:propertyName=
"
x
"
android:propertyName=
"
alpha
"
android:valueFrom=
"
-1280
"
android:valueFrom=
"
1
"
android:valueTo=
"0"
android:valueTo=
"0"
android:valueType=
"floatType"
/>
android:valueType=
"floatType"
/>
</set>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_in_
left
.xml
→
app/src/main/res/anim/slide_in_
up
.xml
View file @
ce795c34
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<set>
<set>
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"400"
android:duration=
"400"
android:propertyName=
"
x
"
android:propertyName=
"
y
"
android:valueFrom=
"1
28
0"
android:valueFrom=
"1
92
0"
android:valueTo=
"0"
android:valueTo=
"0"
android:valueType=
"floatType"
/>
android:valueType=
"floatType"
/>
</set>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_out_
right
.xml
→
app/src/main/res/anim/slide_out_
down
.xml
View file @
ce795c34
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<set>
<set>
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
<objectAnimator
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"400"
android:duration=
"400"
android:propertyName=
"
x
"
android:propertyName=
"
y
"
android:valueFrom=
"0"
android:valueFrom=
"0"
android:valueTo=
"1
28
0"
android:valueTo=
"1
92
0"
android:valueType=
"floatType"
/>
android:valueType=
"floatType"
/>
</set>
</set>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
ce795c34
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
android:fitsSystemWindows=
"true"
tools:openDrawer=
"start"
>
tools:openDrawer=
"start"
android:background=
"?attr/themeColor"
>
<include
<include
layout=
"@layout/app_bar_main"
layout=
"@layout/app_bar_main"
...
...
app/src/main/res/layout/fragment_body.xml
View file @
ce795c34
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
".fragment.BodyFragment"
tools:context=
".fragment.BodyFragment"
android:background=
"
?attr/themeColor
"
>
android:background=
"
@android:color/transparent
"
>
<android.support.design.widget.CoordinatorLayout
<android.support.design.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
<android.support.design.widget.AppBarLayout
<android.support.design.widget.AppBarLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
>
<android.support.design.widget.CollapsingToolbarLayout
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -27,8 +28,7 @@
...
@@ -27,8 +28,7 @@
<RelativeLayout
<RelativeLayout
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
app:layout_collapseMode=
"parallax"
app:layout_collapseMode=
"parallax"
>
android:background=
"?attr/themeColor"
>
<ImageView
<ImageView
android:id=
"@+id/body_picture"
android:id=
"@+id/body_picture"
...
@@ -36,8 +36,7 @@
...
@@ -36,8 +36,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:adjustViewBounds=
"true"
android:adjustViewBounds=
"true"
android:scaleType=
"centerCrop"
android:scaleType=
"centerCrop"
android:transitionName=
"sharedAvatar"
android:transitionName=
"sharedAvatar"
/>
android:background=
"?attr/themeColor"
/>
</RelativeLayout>
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.CollapsingToolbarLayout>
...
@@ -47,6 +46,7 @@
...
@@ -47,6 +46,7 @@
android:id=
"@+id/body_swipe_refresh_layout"
android:id=
"@+id/body_swipe_refresh_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?attr/themeColor"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
...
...
app/src/main/res/layout/fragment_event.xml
View file @
ce795c34
...
@@ -2,29 +2,35 @@
...
@@ -2,29 +2,35 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/container_event"
android:id=
"@+id/container_event"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"app.insti.fragment.EventFragment"
>
tools:context=
"app.insti.fragment.EventFragment"
android:background=
"@android:color/transparent"
>
<RelativeLayout
<android.support.design.widget.CoordinatorLayout
android:id=
"@+id/coordinator"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<LinearLayout
<android.support.design.widget.AppBarLayout
android:id=
"@+id/appBar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
match_par
ent"
android:layout_height=
"
wrap_cont
ent"
android:
orientation=
"vertical
"
>
android:
background=
"@android:color/transparent
"
>
<android.support.v4.widget.NestedScrollView
<android.support.design.widget.CollapsingToolbarLayout
android:id=
"@+id/event_scrollview"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"match_parent"
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
>
<
LinearLayout
<
!-- HEADER -->
android:layout_width=
"match_parent"
<RelativeLayout
android:layout_height=
"
0dp
"
android:layout_height=
"
wrap_content
"
android:layout_w
eight=
"1
"
android:layout_w
idth=
"wrap_content
"
a
ndroid:orientation=
"vertical
"
>
a
pp:layout_collapseMode=
"parallax
"
>
<ImageView
<ImageView
android:id=
"@+id/event_picture_2"
android:id=
"@+id/event_picture_2"
...
@@ -34,179 +40,191 @@
...
@@ -34,179 +40,191 @@
android:scaleType=
"centerCrop"
android:scaleType=
"centerCrop"
android:transitionName=
"sharedAvatar"
/>
android:transitionName=
"sharedAvatar"
/>
<LinearLayout
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id=
"@+id/event_scrollview"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"?attr/themeColor"
android:orientation=
"vertical"
>
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
a
ndroid:background=
"?attr/themeColor
"
a
pp:cardBackgroundColor=
"@color/colorPrimary
"
a
ndroid:orientation=
"vertical
"
>
a
pp:cardCornerRadius=
"0dp
"
>
<
android.support.v7.widget.CardView
<
LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:cardBackgroundColor=
"@color/colorPrimary"
android:layout_gravity=
"center_vertical"
app:cardCornerRadius=
"0dp"
>
android:layout_marginBottom=
"12dp"
android:layout_marginEnd=
"16dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"12dp"
android:layout_weight=
"3"
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:layout_marginBottom=
"12dp"
android:layout_marginEnd=
"16dp"
<TextView
android:layout_marginStart=
"16dp"
android:id=
"@+id/event_page_title"
android:layout_marginTop=
"12dp"
android:layout_width=
"0dp"
android:layout_weight=
"3"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:layout_weight=
"10"
android:text=
"Event Title"
<TextView
android:textColor=
"@color/colorWhite"
android:id=
"@+id/event_page_title"
android:textSize=
"21sp"
android:layout_width=
"0dp"
android:textStyle=
"bold"
/>
android:layout_height=
"wrap_content"
android:layout_weight=
"10"
<ImageButton
android:text=
"Event Title"
android:id=
"@+id/web_event_button"
android:textColor=
"@color/colorWhite"
android:textSize=
"21sp"
android:textStyle=
"bold"
/>
<ImageButton
android:id=
"@+id/web_event_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Event Website"
android:tint=
"@color/colorWhite"
android:visibility=
"invisible"
app:srcCompat=
"@drawable/ic_language_black_24dp"
/>
<ImageButton
android:id=
"@+id/navigate_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Navigate"
android:tint=
"@color/colorWhite"
app:srcCompat=
"@drawable/baseline_navigation_24"
/>
<ImageButton
android:id=
"@+id/share_event_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Share Event"
android:src=
"@drawable/ic_menu_share"
android:tint=
"@color/colorWhite"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Event Website"
android:tint=
"@color/colorWhite"
android:visibility=
"invisible"
app:srcCompat=
"@drawable/ic_language_black_24dp"
/>
<ImageButton
android:id=
"@+id/navigate_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Navigate"
android:tint=
"@color/colorWhite"
app:srcCompat=
"@drawable/baseline_navigation_24"
/>
<ImageButton
android:id=
"@+id/share_event_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Share Event"
android:src=
"@drawable/ic_menu_share"
android:tint=
"@color/colorWhite"
/>
</LinearLayout>
<TextView
<LinearLayout
android:id=
"@+id/event_page_date"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:text=
"No Date Specified"
android:textColor=
"@color/colorWhite"
android:textSize=
"16sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/event_page_date"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"No Date Specified"
android:textColor=
"@color/colorWhite"
android:textColorLink=
"@color/colorWhite"
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
<LinearLayout
style=
"?android:attr/buttonBarStyle"
style=
"?android:attr/buttonBarStyle"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/going_button"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_margin=
"0dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?attr/selectableItemBackground"
android:text=
"GOING"
android:textAllCaps=
"false"
android:textColor=
"@color/secondaryTextColor"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:background=
"#aaa"
>
</View>
<Button
android:id=
"@+id/interested_button"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_margin=
"0dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?attr/selectableItemBackground"
android:text=
"INTERESTED"
android:textAllCaps=
"false"
android:textColor=
"@color/secondaryTextColor"
/>
</LinearLayout>
<Button
android:id=
"@+id/going_button"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_margin=
"0dp"
android:layout_weight=
"1"
android:clickable=
"true"
android:foreground=
"?attr/selectableItemBackground"
android:text=
"GOING"
android:textAllCaps=
"false"
android:textColor=
"@color/secondaryTextColor"
/>
<View
<View
android:layout_width=
"
match_parent
"
android:layout_width=
"
1dp
"
android:layout_height=
"
1dp
"
android:layout_height=
"
match_parent
"
android:background=
"#aaa"
>
android:background=
"#aaa"
>
</View>
</View>
<TextView
<Button
android:id=
"@+id/event_page_description"
android:id=
"@+id/interested_button"
android:layout_width=
"match_parent"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin
Bottom=
"16
dp"
android:layout_margin
=
"0
dp"
android:layout_
marginEnd=
"10dp
"
android:layout_
weight=
"1
"
android:
layout_marginStart=
"10dp
"
android:
clickable=
"true
"
android:
layout_marginTop=
"12dp
"
android:
foreground=
"?attr/selectableItemBackground
"
android:text
Color=
"?attr/themeColorInverse
"
android:text
=
"INTERESTED
"
android:text
ColorLink=
"?attr/urlColor
"
android:text
AllCaps=
"false
"
android:text
Size=
"16sp
"
/>
android:text
Color=
"@color/secondaryTextColor
"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/body_card_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"#aaa"
>
</View>
<android.support.design.widget.FloatingActionButton
<TextView
android:id=
"@+id/edit_fab"
android:id=
"@+id/event_page_description"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginBottom=
"16dp"
android:layout_alignParentRight=
"true"
android:layout_marginEnd=
"10dp"
android:layout_margin=
"16dp"
android:layout_marginStart=
"10dp"
android:src=
"@drawable/ic_edit_black_24dp"
android:layout_marginTop=
"12dp"
android:tint=
"@android:color/black"
android:textColor=
"?attr/themeColorInverse"
android:visibility=
"invisible"
/>
android:textColorLink=
"?attr/urlColor"
android:textSize=
"16sp"
/>
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/body_card_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
/>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/edit_fab"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|bottom"
android:layout_margin=
"16dp"
android:src=
"@drawable/ic_edit_black_24dp"
android:tint=
"@android:color/black"
android:visibility=
"invisible"
/>
<app.insti.TouchImageView
<app.insti.TouchImageView
android:id=
"@+id/expanded_image_event"
android:id=
"@+id/expanded_image_event"
...
...
app/src/main/res/layout/fragment_user.xml
View file @
ce795c34
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Fram
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/container_profile"
android:id=
"@+id/container_profile"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
@@ -60,21 +60,6 @@
...
@@ -60,21 +60,6 @@
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
<ImageButton
android:id=
"@+id/share_user_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_gravity=
"center_vertical"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"Share User"
android:padding=
"16dp"
android:src=
"@drawable/ic_menu_share"
android:tint=
"?attr/themeColorInverse"
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
<android.support.design.widget.TabLayout
<android.support.design.widget.TabLayout
...
@@ -104,6 +89,16 @@
...
@@ -104,6 +89,16 @@
</LinearLayout>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/share_user_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|bottom"
android:layout_margin=
"16dp"
android:src=
"@drawable/ic_menu_share"
android:tint=
"@android:color/black"
android:visibility=
"invisible"
/>
<include
layout=
"@layout/loading_panel"
/>
<include
layout=
"@layout/loading_panel"
/>
<app.insti.TouchImageView
<app.insti.TouchImageView
...
@@ -112,4 +107,4 @@
...
@@ -112,4 +107,4 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:contentDescription=
"Zoomed Image"
android:contentDescription=
"Zoomed Image"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
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