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
01db6740
Commit
01db6740
authored
Jul 04, 2018
by
Sajal Narang
Committed by
GitHub
Jul 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #133 from MayuBhattu/master
Quick Links with basic design
parents
f5bbeac7
3cf8b3cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
185 additions
and
14 deletions
+185
-14
app/src/main/java/app/insti/fragment/QLinksFragment.java
app/src/main/java/app/insti/fragment/QLinksFragment.java
+59
-9
app/src/main/res/layout/fragment_qlinks.xml
app/src/main/res/layout/fragment_qlinks.xml
+125
-5
app/src/main/res/values/dimens.xml
app/src/main/res/values/dimens.xml
+1
-0
No files found.
app/src/main/java/app/insti/fragment/QLinksFragment.java
View file @
01db6740
package
app.insti.fragment
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
android.widget.TextView
;
import
app.insti.R
;
/**
* A simple {@link Fragment} subclass.
*/
public
class
QLinksFragment
extends
BaseFragment
{
public
QLinksFragment
()
{
// Required empty public constructor
}
public
void
onStart
(){
super
.
onStart
();
TextView
CMS
=
getActivity
().
findViewById
(
R
.
id
.
button_CMS
);
TextView
CMSMaint
=
getActivity
().
findViewById
(
R
.
id
.
button_CMSMaint
);
TextView
CMSNet
=
getActivity
().
findViewById
(
R
.
id
.
button_CMSNet
);
TextView
ASC
=
getActivity
().
findViewById
(
R
.
id
.
button_ASC
);
TextView
ASCExt
=
getActivity
().
findViewById
(
R
.
id
.
button_ASCExt
);
TextView
Moodle
=
getActivity
().
findViewById
(
R
.
id
.
button_Moodle
);
TextView
Intern
=
getActivity
().
findViewById
(
R
.
id
.
button_Internship
);
TextView
Placement
=
getActivity
().
findViewById
(
R
.
id
.
button_Placement
);
TextView
Library
=
getActivity
().
findViewById
(
R
.
id
.
button_Library
);
TextView
AcadCal
=
getActivity
().
findViewById
(
R
.
id
.
button_Acad_calender
);
TextView
AcadTime
=
getActivity
().
findViewById
(
R
.
id
.
button_Acad_timetable
);
TextView
Holidays
=
getActivity
().
findViewById
(
R
.
id
.
button_Holidays
);
TextView
Circulars
=
getActivity
().
findViewById
(
R
.
id
.
button_Circulars
);
TextView
Courses
=
getActivity
().
findViewById
(
R
.
id
.
button_Courselist
);
TextView
GPO
=
getActivity
().
findViewById
(
R
.
id
.
button_GPO
);
TextView
CAMP
=
getActivity
().
findViewById
(
R
.
id
.
button_CAMP
);
TextView
MSStore
=
getActivity
().
findViewById
(
R
.
id
.
button_MSStore
);
TextView
BigHome
=
getActivity
().
findViewById
(
R
.
id
.
button_BigHomeCloud
);
TextView
FTP
=
getActivity
().
findViewById
(
R
.
id
.
button_FTP
);
TextView
Intercom
=
getActivity
().
findViewById
(
R
.
id
.
button_Intercom
);
TextView
Hospital
=
getActivity
().
findViewById
(
R
.
id
.
button_Hospital
);
TextView
VPN
=
getActivity
().
findViewById
(
R
.
id
.
button_VPN
);
CMS
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://gymkhana.iitb.ac.in/cms_new/"
);
}
});
CMSMaint
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://support.iitb.ac.in"
);
}
});
CMSNet
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://help-cc.iitb.ac.in/"
);
}
});
ASC
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://asc.iitb.ac.in"
);
}
});
ASCExt
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://portal.iitb.ac.in/asc"
);
}
});
Moodle
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://moodle.iitb.ac.in"
);
}
});
Intern
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://placements.iitb.ac.in/internship/login.jsp"
);
}
});
Placement
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://placements.iitb.ac.in/placements/login.jsp"
);
}
});
Library
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.library.iitb.ac.in/"
);
}
});
AcadCal
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/newacadhome/toacadcalender.jsp"
);
}
});
AcadTime
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/newacadhome/timetable.jsp"
);
}
});
Holidays
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/en/about-iit-bombay/iit-bombay-holidays-list"
);
}
});
Circulars
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/newacadhome/circular.jsp"
);
}
});
Courses
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://portal.iitb.ac.in/asc/Courses"
);
}
});
GPO
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://gpo.iitb.ac.in"
);
}
});
CAMP
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://camp.iitb.ac.in/"
);
}
});
MSStore
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://msstore.iitb.ac.in/"
);
}
});
BigHome
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://home.iitb.ac.in/"
);
}
});
FTP
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"ftp://ftp.iitb.ac.in/"
);
}
});
Intercom
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://portal.iitb.ac.in/TelephoneDirectory/"
);
}
});
Hospital
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"http://www.iitb.ac.in/hospital/"
);
}
});
VPN
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
goToUrl
(
"https://www.cc.iitb.ac.in/engservices/engaccessingiitffromoutside/19-vpn"
);
}
});
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_qlinks
,
container
,
false
);
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_qlinks
,
container
,
false
);
return
view
;
}
public
void
goToUrl
(
String
url
)
{
Uri
uriUrl
=
Uri
.
parse
(
url
);
Intent
launchBrowser
=
new
Intent
(
Intent
.
ACTION_VIEW
,
uriUrl
);
startActivity
(
launchBrowser
);
}
}
app/src/main/res/layout/fragment_qlinks.xml
View file @
01db6740
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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=
"app.insti.fragment.QLinksFragment"
>
<
!-- TODO: Update blank fragment layout -->
<TextView
android:layout_
width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/hello_blank_fragment
"
/>
<
ScrollView
android:layout_width=
"fill_parent"
android:layout_
height=
"wrap_content"
>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
" CMS"
android:textSize=
"25sp
"
/>
<TextView
android:id=
"@+id/button_CMS"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"CMS"
/>
<TextView
android:id=
"@+id/button_CMSMaint"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"CMS - Maintainance"
/>
<TextView
android:id=
"@+id/button_CMSNet"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"CMS - Network"
/>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
" Academics"
android:textSize=
"25sp"
/>
<TextView
android:id=
"@+id/button_ASC"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"ASC"
/>
<TextView
android:id=
"@+id/button_ASCExt"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"External ASC"
/>
<TextView
android:id=
"@+id/button_Moodle"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Moodle"
/>
<TextView
android:id=
"@+id/button_Internship"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Internship Login"
/>
<TextView
android:id=
"@+id/button_Placement"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Placement Login"
/>
<TextView
android:id=
"@+id/button_Library"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Central Library"
/>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
" Calender"
android:textSize=
"25sp"
/>
<TextView
android:id=
"@+id/button_Acad_calender"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Academic Calender"
/>
<TextView
android:id=
"@+id/button_Acad_timetable"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Academic Timetable"
/>
<TextView
android:id=
"@+id/button_Holidays"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Holidays List"
/>
<TextView
android:id=
"@+id/button_Circulars"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Circulars"
/>
<TextView
android:id=
"@+id/button_Courselist"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"CMS Maintainance"
/>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
" Services"
android:textSize=
"25sp"
/>
<TextView
android:id=
"@+id/button_GPO"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"GPO"
/>
<TextView
android:id=
"@+id/button_CAMP"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"CAMP"
/>
<TextView
android:id=
"@+id/button_MSStore"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Microsoft Store"
/>
<TextView
android:id=
"@+id/button_BigHomeCloud"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"BigHome Cloud"
/>
<TextView
android:id=
"@+id/button_FTP"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"FTP"
/>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:text=
" Miscellaneous"
android:textSize=
"25sp"
/>
<TextView
android:id=
"@+id/button_Intercom"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Intercom Extensions"
/>
<TextView
android:id=
"@+id/button_Hospital"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Hospital"
/>
<TextView
android:id=
"@+id/button_VPN"
android:textSize=
"@dimen/quick_links_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"VPN Guide"
/>
</LinearLayout>
</ScrollView>
</FrameLayout>
app/src/main/res/values/dimens.xml
View file @
01db6740
...
...
@@ -5,4 +5,5 @@
<dimen
name=
"nav_header_vertical_spacing"
>
8dp
</dimen>
<dimen
name=
"nav_header_height"
>
176dp
</dimen>
<dimen
name=
"fab_margin"
>
16dp
</dimen>
<dimen
name=
"quick_links_size"
>
18dp
</dimen>
</resources>
\ 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