├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── codingblocks
│ │ └── com
│ │ └── gsocinfo
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── main_page.json
│ │ ├── org.json
│ │ └── projects.json
│ ├── java
│ │ └── codingblocks
│ │ │ └── com
│ │ │ └── gsocinfo
│ │ │ ├── Constants.java
│ │ │ ├── GSoCApp.java
│ │ │ ├── activities
│ │ │ ├── HomeActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ └── OrgDetailActivity.java
│ │ │ ├── adapters
│ │ │ ├── FaqAdapter.java
│ │ │ ├── OrgAdapter.java
│ │ │ ├── ProjectAdapter.java
│ │ │ ├── TagAdapter.java
│ │ │ └── TimelineAdapter.java
│ │ │ ├── data
│ │ │ ├── model
│ │ │ │ ├── MainPage.java
│ │ │ │ ├── Organization.java
│ │ │ │ ├── Organizations.java
│ │ │ │ ├── Project.java
│ │ │ │ ├── Projects.java
│ │ │ │ └── Student.java
│ │ │ └── viewmodel
│ │ │ │ ├── MainPageViewModel.java
│ │ │ │ ├── OrganizationViewModel.java
│ │ │ │ └── ProjectViewModel.java
│ │ │ ├── db
│ │ │ ├── AppDatabase.java
│ │ │ ├── Converter.java
│ │ │ └── dao
│ │ │ │ ├── MainPageDao.java
│ │ │ │ ├── OrganizationDao.java
│ │ │ │ └── ProjectDao.java
│ │ │ └── fragments
│ │ │ ├── ChatFragment.java
│ │ │ ├── FaqFragment.java
│ │ │ ├── MainPageFragment.java
│ │ │ ├── OrgDetailFragment.java
│ │ │ ├── OrganizationFragment.java
│ │ │ ├── ProjectFragment.java
│ │ │ └── RequestFragment.java
│ ├── res
│ │ ├── anim
│ │ │ ├── slide_down.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ └── slide_up.xml
│ │ ├── drawable
│ │ │ ├── apply.png
│ │ │ ├── bg_card_code.png
│ │ │ ├── bg_globe.png
│ │ │ ├── bg_login.xml
│ │ │ ├── bg_mountains.png
│ │ │ ├── bordered_translucent_button.xml
│ │ │ ├── chip.xml
│ │ │ ├── cloud_left.png
│ │ │ ├── cloud_right.png
│ │ │ ├── code.png
│ │ │ ├── globe_flag.png
│ │ │ ├── green_landscape.png
│ │ │ ├── home_banner_world.png
│ │ │ ├── ic_dashboard_black_24dp.xml
│ │ │ ├── ic_home_black_24dp.xml
│ │ │ ├── ic_notifications_black_24dp.xml
│ │ │ ├── ic_search.xml
│ │ │ ├── marker.xml
│ │ │ ├── moon.png
│ │ │ ├── mountains_landscape.png
│ │ │ ├── project_bg_1.png
│ │ │ ├── project_bg_2.png
│ │ │ ├── project_bg_3.png
│ │ │ ├── project_bg_4.png
│ │ │ ├── project_bg_four.xml
│ │ │ ├── project_bg_one.xml
│ │ │ ├── project_bg_three.xml
│ │ │ ├── project_bg_two.xml
│ │ │ ├── project_link.xml
│ │ │ ├── satellite.png
│ │ │ ├── share.png
│ │ │ ├── side_nav_bar.xml
│ │ │ ├── stars_bg.png
│ │ │ ├── stars_with_bg.xml
│ │ │ ├── summer_of_code_logo.xml
│ │ │ └── telescope.png
│ │ ├── layout
│ │ │ ├── activity_home.xml
│ │ │ ├── activity_login.xml
│ │ │ ├── activity_org_detail.xml
│ │ │ ├── app_bar_home.xml
│ │ │ ├── content_home.xml
│ │ │ ├── dialog_progress.xml
│ │ │ ├── fragment_about.xml
│ │ │ ├── fragment_faq.xml
│ │ │ ├── fragment_org.xml
│ │ │ ├── fragment_org_details.xml
│ │ │ ├── fragment_project.xml
│ │ │ ├── item_card_about.xml
│ │ │ ├── item_faq.xml
│ │ │ ├── item_org.xml
│ │ │ ├── item_project.xml
│ │ │ ├── item_tag.xml
│ │ │ ├── item_timeline.xml
│ │ │ ├── item_timeline_summary.xml
│ │ │ └── nav_header_about.xml
│ │ ├── menu
│ │ │ ├── about.xml
│ │ │ ├── activity_about_drawer.xml
│ │ │ └── navigation.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-v21
│ │ │ └── styles.xml
│ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── xml
│ │ │ └── searchable.xml
│ └── web_hi_res_512.png
│ └── test
│ └── java
│ └── codingblocks
│ └── com
│ └── gsocinfo
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── lombok.config
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # Intellij
36 | *.iml
37 | .idea/
38 |
39 | # Keystore files
40 | *.jks
41 |
42 | # External native build folder generated in Android Studio 2.2 and later
43 | .externalNativeBuild
44 |
45 | # Freeline
46 | freeline.py
47 | freeline/
48 | freeline_project_description.json
49 |
50 | .DS_Store
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at harshithdwivedi@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GSoC-Android
2 | Google Summer of Code Companion app
3 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.google.firebase.firebase-perf'
3 |
4 | android {
5 | compileSdkVersion 26
6 | buildToolsVersion "26.0.1"
7 | defaultConfig {
8 | vectorDrawables.useSupportLibrary = true
9 | multiDexEnabled true
10 | applicationId "com.codingblocks.gsocinfo"
11 | minSdkVersion 16
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
28 | exclude group: 'com.android.support', module: 'support-annotations'
29 | })
30 | //Room and livedata
31 | compile 'android.arch.lifecycle:runtime:1.0.0'
32 | compile 'android.arch.lifecycle:extensions:1.0.0-alpha9-1'
33 | compile 'android.arch.persistence.room:runtime:1.0.0-alpha9-1'
34 | compile 'android.arch.paging:runtime:1.0.0-alpha1'
35 | compile 'com.commonsware.cwac:anddown:0.4.0'
36 | compile 'com.android.support:design:26.1.0'
37 | compile 'com.android.support:cardview-v7:26.1.0'
38 | compile 'com.android.support:recyclerview-v7:26.1.0'
39 | compile 'com.android.support:customtabs:26.1.0'
40 | compile 'com.google.code.gson:gson:2.8.1'
41 | compile 'com.squareup.picasso:picasso:2.5.2'
42 | compile 'com.github.vipulasri:timelineview:1.0.5'
43 | compile 'com.google.firebase:firebase-core:11.2.2'
44 | compile 'com.google.firebase:firebase-crash:11.2.2'
45 | compile 'com.google.firebase:firebase-perf:11.2.2'
46 | compile 'com.android.support:support-v4:26.1.0'
47 | compile 'com.android.support:support-vector-drawable:26.0.0-alpha1'
48 | compile 'de.hdodenhof:circleimageview:2.1.0'
49 | compile 'com.getkeepsafe.taptargetview:taptargetview:1.9.1'
50 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
51 | testCompile 'junit:junit:4.12'
52 | annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-alpha9-1'
53 | annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-alpha9-1'
54 | provided 'org.projectlombok:lombok:1.16.18'
55 | }
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "828479045119",
4 | "firebase_url": "https://gsoc-info-android.firebaseio.com",
5 | "project_id": "gsoc-info-android",
6 | "storage_bucket": "gsoc-info-android.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:828479045119:android:45f744589da4a201",
12 | "android_client_info": {
13 | "package_name": "codingblocks.com.gsocinfo"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "828479045119-aqv4g3h9ku00adtfhb1spu2uptk0b0fa.apps.googleusercontent.com",
19 | "client_type": 1,
20 | "android_info": {
21 | "package_name": "codingblocks.com.gsocinfo",
22 | "certificate_hash": "91e3a722cd18b686c01d20b5b13f783215d6ee01"
23 | }
24 | },
25 | {
26 | "client_id": "828479045119-jlekann1u40mtp22jihpcdbbonmef73u.apps.googleusercontent.com",
27 | "client_type": 3
28 | }
29 | ],
30 | "api_key": [
31 | {
32 | "current_key": "AIzaSyAvH5zcbceIB2PlG8sqxCtDHLJ2CV7Tewg"
33 | }
34 | ],
35 | "services": {
36 | "analytics_service": {
37 | "status": 1
38 | },
39 | "appinvite_service": {
40 | "status": 2,
41 | "other_platform_oauth_client": [
42 | {
43 | "client_id": "828479045119-jlekann1u40mtp22jihpcdbbonmef73u.apps.googleusercontent.com",
44 | "client_type": 3
45 | }
46 | ]
47 | },
48 | "ads_service": {
49 | "status": 2
50 | }
51 | }
52 | }
53 | ],
54 | "configuration_version": "1"
55 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/harshit/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/codingblocks/com/gsocinfo/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("codingblocks.com.gsocinfo", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
14 |
15 |
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/assets/main_page.json:
--------------------------------------------------------------------------------
1 | {
2 | "features":{
3 | "student_finals_can_be_submitted":true,
4 | "org_payment_details_can_be_changed":true,
5 | "admins_can_register":true,
6 | "mentor_first_evals_can_be_submitted":false,
7 | "students_can_edit_project":true,
8 | "tax_forms_can_be_uploaded":true,
9 | "accepted_projects_published":true,
10 | "student_first_evals_can_be_submitted":false,
11 | "second_enrollment_forms_can_be_submitted":false,
12 | "enrollments_can_be_reviewed":false,
13 | "mentor_second_evals_can_be_submitted":false,
14 | "slots_can_be_assigned":false,
15 | "second_eval_emails_can_be_sent":false,
16 | "orgs_can_be_edited":true,
17 | "mentor_finals_can_be_submitted":false,
18 | "slot_allocation_emails_can_be_sent":false,
19 | "projects_can_be_accepted":false,
20 | "enrollments_can_undergo_second_review":false,
21 | "orgs_can_be_accepted":false,
22 | "students_can_register":false,
23 | "second_enrollments_can_be_reviewed":false,
24 | "second_enrollment_forms_can_be_re_submitted":false,
25 | "org_members_can_edit_proposal":false,
26 | "evaluations_in_progress":true,
27 | "proposal_can_be_deleted":false,
28 | "accepted_orgs_published":true,
29 | "results_published":false,
30 | "send_assignee_emails":true,
31 | "org_members_can_view_final_proposals":true,
32 | "orgs_can_register":false,
33 | "student_second_evals_can_be_submitted":false,
34 | "enrollment_forms_can_be_submitted":false,
35 | "project_decisions_emails_can_be_sent":false,
36 | "orgs_can_see_enrollment_status":true,
37 | "proposal_in_progress":false,
38 | "orgs_have_been_accepted":true,
39 | "mentors_can_register":true,
40 | "final_evaluations_emails_can_be_sent":false,
41 | "slots_can_be_requested":false,
42 | "org_accept_reject_emails_can_be_sent":false,
43 | "org_payment_details_visible":true,
44 | "students_can_submit_proposals":false,
45 | "student_withdrawals_trigger_email":true,
46 | "enrollment_forms_can_be_re_submitted":false,
47 | "tax_forms_can_be_reviewed":true,
48 | "first_eval_emails_can_be_sent":false,
49 | "second_review_status_visible":true,
50 | "project_decisions_can_be_finalized":false,
51 | "student_home_address_is_editable":false
52 | },
53 | "copy":{
54 | "number_of_lines_of_code":"30,000,000+",
55 | "homepage_start_button":"Get Started",
56 | "number_of_students":"13,000+",
57 | "homepage_intro_paragraph":"Google Summer of Code is a global program focused on bringing more student developers into open source software development. Students work with an open source organization on a 3 month programming project during their break from school.",
58 | "number_of_mentors":"11,000+",
59 | "number_of_student_and_mentor_countries":"118",
60 | "number_of_years":"12",
61 | "number_of_organizations":"607",
62 | "number_of_student_countries":"104"
63 | },
64 | "year":2017,
65 | "state":"final_week",
66 | "is_current":true,
67 | "org_signup_open":false,
68 | "org_approval":false,
69 | "orgs_published":false,
70 | "student_signup_open":false,
71 | "slot_request":false,
72 | "slot_allocation_grace_period":false,
73 | "project_acceptance":false,
74 | "project_decisions_finalization":false,
75 | "first_work_period":false,
76 | "first_evaluations":false,
77 | "second_work_period":false,
78 | "second_evaluations":false,
79 | "third_work_period":false,
80 | "final_week":true,
81 | "final_evaluations_mentor":false,
82 | "post_program":false,
83 | "org_signup_open_starts":"2017-01-19T17:00:00Z",
84 | "org_signup_open_ends":"2017-02-09T16:59:59Z",
85 | "org_approval_starts":"2017-02-09T17:00:00Z",
86 | "org_approval_ends":"2017-02-27T16:59:59Z",
87 | "orgs_published_starts":"2017-02-27T17:00:00Z",
88 | "orgs_published_ends":"2017-03-20T15:59:59Z",
89 | "student_signup_open_starts":"2017-03-20T16:00:00Z",
90 | "student_signup_open_ends":"2017-04-03T15:59:59Z",
91 | "slot_request_starts":"2017-04-03T16:00:00Z",
92 | "slot_request_ends":"2017-04-17T15:59:59Z",
93 | "slot_allocation_grace_period_starts":"2017-04-17T16:00:00Z",
94 | "slot_allocation_grace_period_ends":"2017-04-19T15:59:59Z",
95 | "project_acceptance_starts":"2017-04-19T16:00:00Z",
96 | "project_acceptance_ends":"2017-04-24T15:59:59Z",
97 | "project_decisions_finalization_starts":"2017-04-24T16:00:00Z",
98 | "project_decisions_finalization_ends":"2017-05-04T15:59:59Z",
99 | "first_work_period_starts":"2017-05-04T16:00:00Z",
100 | "first_work_period_ends":"2017-06-26T15:59:59Z",
101 | "first_evaluations_starts":"2017-06-26T16:00:00Z",
102 | "first_evaluations_ends":"2017-06-30T15:59:59Z",
103 | "second_work_period_starts":"2017-06-30T16:00:00Z",
104 | "second_work_period_ends":"2017-07-24T15:59:59Z",
105 | "second_evaluations_starts":"2017-07-24T16:00:00Z",
106 | "second_evaluations_ends":"2017-07-28T15:59:59Z",
107 | "third_work_period_starts":"2017-07-28T16:00:00Z",
108 | "third_work_period_ends":"2017-08-21T15:59:59Z",
109 | "final_week_starts":"2017-08-21T16:00:00Z",
110 | "final_week_ends":"2017-08-29T15:59:59Z",
111 | "final_evaluations_mentor_starts":"2017-08-29T16:00:00Z",
112 | "final_evaluations_mentor_ends":"2017-09-05T15:59:59Z",
113 | "post_program_starts":"2017-09-05T16:00:00Z",
114 | "post_program_ends":null,
115 | "community_bonding_period_starts":"2017-05-04T19:00:00Z",
116 | "community_bonding_period_ends":"2017-05-30T08:00:00Z",
117 | "coding_period_starts":"2017-05-30T08:00:00Z",
118 | "coding_period_ends":"2017-08-21T16:00:00Z",
119 | "results_announced":"2017-09-06T16:00:00Z",
120 | "tax_forms_deadline":"2017-05-16T19:00:00Z",
121 | "first_payments":"2017-07-01T00:00:00Z",
122 | "second_payments":"2017-07-29T00:00:00Z",
123 | "final_payments":"2017-09-07T00:00:00Z",
124 | "first_evaluations_finalized":"2017-06-30T16:05:47Z",
125 | "second_evaluations_finalized":"2017-07-28T17:35:32Z",
126 | "final_evaluations_finalized":null,
127 | "projects_accepted_count":1296,
128 | "org_accepted_count":201,
129 | "slot_allocation_finalized":"2017-04-19T05:43:09Z",
130 | "second_enrollment_form_upload_deadline":"2017-05-01T15:59:59Z"
131 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/Constants.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo;
2 |
3 | import java.util.ArrayList;
4 |
5 |
6 | /**
7 | * Created by vraun on 25-08-2017.
8 | */
9 |
10 | public class Constants {
11 |
12 | public static ArrayList generateTitle(){
13 | ArrayList title = new ArrayList<>();
14 | title.add("Organization Applications open");
15 | title.add("Organizations Application Deadline");
16 | title.add("Organizations Announced");
17 | title.add("Student Application Period");
18 | title.add("Application Review Period");
19 | title.add("Student Projectsss Announced");
20 | title.add("Community Bonding");
21 | title.add("Coding");
22 | title.add("Evaluations");
23 | title.add("Students Submit Code and Final Evaluations");
24 | title.add("Mentors Submit Final Evaluations");
25 | title.add("Results Announced");
26 | return title ;
27 |
28 | }
29 |
30 | public static ArrayList generateDescription(){
31 | ArrayList description = new ArrayList<>();
32 | description.add("Open source organizations that would like to participate as a mentor organization in this year’s program can apply.");
33 | description.add("All organizations wishing to be a part of GSoC 2017 must complete their application by February 9, 2017 22:30 (India Standard Time)");
34 | description.add("Interested students can now begin discussing project ideas with accepted mentor organizations.");
35 | description.add("Students can register and submit their applications to mentor organizations. All proposals must be submitted by April 3, 2017 21:30 (India Standard Time).");
36 | description.add("Organizations review and select student proposals.");
37 | description.add("Accepted students are paired with a mentor and start planning their projects and milestones.");
38 | description.add("Students spend a month learning more about their organization’s community.");
39 | description.add("Students work on their Google Summer of Code projects.\n" +
40 | "while time.now() < deadline:\n" +
41 | " code() and debug() and document()");
42 | description.add("Mentors and students submit their evaluations of one another. These evaluations are a required step of the program.");
43 | description.add("Students submit their code, project summaries, and final evaluations of their mentors.");
44 | description.add("Mentors review student code samples and determine if the students have successfully completed their Google Summer of Code 2017 project.");
45 | description.add("Students are notified of the pass/fail status of their Google Summer of Code 2017 projects.");
46 |
47 |
48 | return description ;
49 |
50 | }
51 |
52 | public static ArrayList generateDate(){
53 | ArrayList date = new ArrayList<>();
54 | date.add("January 19, 2017");
55 | date.add("February 9, 2017");
56 | date.add("February 27, 2017");
57 | date.add("March 20, 2017 - April 3, 2017");
58 | date.add("April 3, 2017 - May 4, 2017");
59 | date.add("May 4, 2017");
60 | date.add("May 5 - 30, 2017");
61 | date.add("May 30, 2017 - August 21, 2017");
62 | date.add("June 26 - 30, 2017\n" +
63 | "July 24 - 28, 2017");
64 | date.add("August 21 - 29, 2017");
65 | date.add("August 29, 2017 - September 5, 2017");
66 | date.add("September 6, 2017");
67 |
68 |
69 | return date ;
70 |
71 | }
72 |
73 | public static ArrayList getGeneralQuestions(){
74 | ArrayList generalQuestions = new ArrayList<>();
75 |
76 | generalQuestions.add("When can students apply for GSoC?");
77 | generalQuestions.add("What programming language(s) should I know to participate in GSoC?");
78 | generalQuestions.add("Can I submit more than one proposal?");
79 | generalQuestions.add("Can students already working on an open source project continue to work on it as part of GSoC?");
80 | generalQuestions.add("Can a group submit a proposal together to work on a single project?");
81 | generalQuestions.add("Should I send proposals directly to the mentoring organizations?");
82 | generalQuestions.add("What are the eligibility requirements for participation?");
83 | generalQuestions.add("What forms will I need to provide?");
84 | generalQuestions.add("I am an accepted student in the United States on an F1 visa. How do I get authorization to participate?");
85 | generalQuestions.add("How do I know if my school is “accredited”?");
86 | generalQuestions.add("I graduate in the middle of the program. Can I still participate?");
87 | generalQuestions.add("Do I get paid for participating in GSoC? ");
88 | generalQuestions.add("Will I get paid even if the organization does not use my code?");
89 | generalQuestions.add("What does a good student proposal look like?");
90 | generalQuestions.add("How much time does GSoC participation take?");
91 | generalQuestions.add("Can I earn course credit for participating in GSoC?");
92 | generalQuestions.add("Is Google Summer of Code (GSoC) a recruiting program?");
93 | generalQuestions.add("Is GSoC considered an internship, a job, or any form of employment?");
94 | generalQuestions.add("Are mentoring organizations required to use the code produced by students? ");
95 | generalQuestions.add("Where does GSoC occur?");
96 | generalQuestions.add("What can I do to help spread the word about GSoC?");
97 | generalQuestions.add("How do I organize or host a GSoC information session or meetup?");
98 | generalQuestions.add("Can I participate in GSoC as both a mentor and a student?");
99 | generalQuestions.add("What if I have more questions?");
100 |
101 | return generalQuestions ;
102 |
103 | }
104 |
105 | public static ArrayList getGeneralAnswers(){
106 | ArrayList generalAnswers = new ArrayList<>();
107 | generalAnswers.add("Please see the program timeline for more detailed information.");
108 | generalAnswers.add("The programming language you need to know depends on which organization you are\n" +
109 | "interested in working with. You should be familiar with the programming\n" +
110 | "language(s) used by that organization.");
111 | generalAnswers.add("Yes, each student may submit up to five proposals. However, only one per student\n" +
112 | "may be accepted. No more than one proposal per student will be accepted, no\n" +
113 | "matter how many proposals you submit.");
114 | generalAnswers.add("Yes, but students should be sure to note their previous relationship with the\n" +
115 | "project in their proposals.");
116 | generalAnswers.add("No, only an individual may work on a given project.");
117 | generalAnswers.add("No, all proposals should be submitted to the program site. Proposals submitted\n" +
118 | "outside of the Google Summer of Code program site ");
119 | generalAnswers.add("You must be at least 18 years of age\n " +
120 | "You must currently be a full or part-time student (or have been accepted for the fall term) at an" +
121 | " accredited " + "university as of the student acceptance date. \n" +
122 | "You must be eligible to work in the country you will reside in during the program\n" +
123 | "You have not already been accepted as a Student in GSoC more than once"
124 | + "You must reside in a country that is not currently embargoed by the United States. See Program Rules for more information.");
125 | generalAnswers.add("All applicants will need to provide proof of enrollment accredited educational institution.");
126 | generalAnswers.add("Accepted participants will need to provide appropriate tax forms");
127 | generalAnswers.add("Please talk to your school's international student affairs office for more details. In the past, students on an F1 visa have participated in GSoC through\n" +
128 | "CPT\n" + "but you will need to check with your school to see what will work best.\n" + "Students with accepted projects can receive a CPT letter upon request.");
129 | generalAnswers.add("You can learn more about accreditation for universities here.\n" +
130 | "Please note that participating in online courses, even if they are with accredited universities, does not alone constitute enrollment. You must be/will be enrolled at the university.");
131 | generalAnswers.add("Yes, as long as you are accepted into or enrolled in a college or university program as of the date accepted students are announced, you are eligible to participate in the program. Students must provide proof of enrollment during the proposal period.");
132 | generalAnswers.add("Yes! Google will provide a stipend to those students who successfully complete the program. More information on the stipend can be found here");
133 | generalAnswers.add("Yes, so long as the student passes his/her evaluation(s). Whether or not the project uses the produced code does not impact the student stipend.");
134 | generalAnswers.add("The Student Manual has a section on \"Writing a Proposal\". \n" + "The best proposals are often from students who took the time to interact and discuss their ideas with the organization before submission. Be sure to include the following: detail on exactly what you're proposing, why you're proposing it, the reason you're qualified to do it, and your development methodology. It should also include details of your academic, industry, and/or open source development experience.");
135 | generalAnswers.add("You are expected to spend around 30+ hours a week working on your project during the 3 month coding period. If you already have an internship, another summer job, or plan to be gone on vacation for more than a week during that time, GSoC is not the right program for you this year.");
136 | generalAnswers.add("Absolutely. Google can provide documentation to your school so you can obtain course credit once we receive a positive final evaluation from your mentor.");
137 | generalAnswers.add("No. If you are interested in working for Google, please visit the\n Google jobs website.");
138 | generalAnswers.add("No. GSoC is an activity that the student performs as an independent developer for which he/she is paid a stipend.");
139 | generalAnswers.add("No. While we hope that all the code that comes out of this program will find a happy home, we don’t require organizations to use the student's' code.");
140 | generalAnswers.add("Google Summer of Code occurs entirely online; there is no requirement to travel as part of the program.");
141 | generalAnswers.add("You can download\n flyers to post\n" +
142 | "around your campus. You can also tweet about the program, make YouTube videos,\n" +
143 | "or host a meetup or information session in your area.");
144 | generalAnswers.add("You are welcome to schedule a meetup at whatever time and place is convenient\n" +
145 | "for you! Please review the\n Program Rules first and utilize our " +
146 | "\n presentation template \n" +
147 | "and flyers. Send us the details of the meetup (date, location, time etc.) and we\n" +
148 | "will add it to our external calendar. Google Open Source Blog We'd love to see a blog post (including pictures!) for the\n Google Open Source Blog" );
149 | generalAnswers.add("No. We want to make sure that each project and student receives sufficient\n" +
150 | "attention, and we feel this could create a bad experience for those\n" +
151 | "involved. Please choose whether participation as a mentor or a student is more\n" +
152 | "appealing to you and plan to apply accordingly.");
153 | generalAnswers.add("Check out the Student Manual and\n" +
154 | "other pages on this site . If after reading through all the documentation you still don't have an answer\n" +
155 | "please consider reaching out to the GSoC community via IRC or the discussion\n" +
156 | "list. Visit\n" +
157 | "the Contact Us page to find out how ");
158 | return generalAnswers;
159 |
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/GSoCApp.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo;
2 |
3 | import android.app.Application;
4 | import android.arch.persistence.room.Room;
5 |
6 | import codingblocks.com.gsocinfo.db.AppDatabase;
7 | import codingblocks.com.gsocinfo.db.dao.MainPageDao;
8 | import codingblocks.com.gsocinfo.db.dao.OrganizationDao;
9 | import codingblocks.com.gsocinfo.db.dao.ProjectDao;
10 |
11 | /**
12 | * Created by harshit on 08/09/17.
13 | */
14 |
15 | public class GSoCApp extends Application {
16 |
17 | private static ProjectDao projectsDao;
18 | private static OrganizationDao organizationDao;
19 | private static MainPageDao mainPageDao;
20 | private static AppDatabase appDatabase;
21 |
22 | public static OrganizationDao getOrgDao() {
23 | if (organizationDao == null)
24 | organizationDao = appDatabase.getOrganizationsDao();
25 | return organizationDao;
26 | }
27 |
28 | public static ProjectDao getProjectDao() {
29 | if (projectsDao == null)
30 | projectsDao = appDatabase.getProjectsDao();
31 | return projectsDao;
32 | }
33 |
34 | public static MainPageDao getMainPageDao() {
35 | if (mainPageDao == null)
36 | mainPageDao = appDatabase.getMainPageDao();
37 | return mainPageDao;
38 | }
39 |
40 | @Override
41 | public void onCreate() {
42 | super.onCreate();
43 | appDatabase = Room.databaseBuilder(getApplicationContext(), AppDatabase.class, "gsoc-database")
44 | .fallbackToDestructiveMigration()
45 | .build();
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/activities/HomeActivity.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.activities;
2 |
3 | import android.content.SharedPreferences;
4 | import android.os.Build;
5 | import android.os.Bundle;
6 | import android.preference.PreferenceManager;
7 | import android.support.design.widget.FloatingActionButton;
8 | import android.support.design.widget.NavigationView;
9 | import android.support.design.widget.Snackbar;
10 | import android.support.v4.view.GravityCompat;
11 | import android.support.v4.widget.DrawerLayout;
12 | import android.support.v7.app.ActionBarDrawerToggle;
13 | import android.support.v7.app.AppCompatActivity;
14 | import android.support.v7.widget.Toolbar;
15 | import android.transition.Fade;
16 | import android.view.MenuItem;
17 | import android.view.View;
18 |
19 | import com.getkeepsafe.taptargetview.TapTarget;
20 | import com.getkeepsafe.taptargetview.TapTargetSequence;
21 |
22 | import codingblocks.com.gsocinfo.R;
23 | import codingblocks.com.gsocinfo.fragments.FaqFragment;
24 | import codingblocks.com.gsocinfo.fragments.MainPageFragment;
25 | import codingblocks.com.gsocinfo.fragments.OrganizationFragment;
26 | import codingblocks.com.gsocinfo.fragments.ProjectFragment;
27 |
28 | public class HomeActivity extends AppCompatActivity
29 | implements NavigationView.OnNavigationItemSelectedListener {
30 |
31 | MainPageFragment mainPageFragment;
32 | OrganizationFragment organizationFragment;
33 | ProjectFragment projectFragment;
34 | Toolbar toolbar;
35 | SharedPreferences sharedPreferences;
36 |
37 | @Override
38 | protected void onCreate(final Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.activity_home);
41 | toolbar = findViewById(R.id.toolbar);
42 | setSupportActionBar(toolbar);
43 | toolbar.inflateMenu(R.menu.about);
44 | FloatingActionButton fab = findViewById(R.id.fab);
45 | sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
46 |
47 | fab.setOnClickListener(new View.OnClickListener() {
48 | @Override
49 | public void onClick(View view) {
50 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
51 | .setAction("Action", null).show();
52 | }
53 | });
54 |
55 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
56 | Fade fade = new Fade();
57 | fade.excludeTarget(R.id.appBarMain, true);
58 | fade.excludeTarget(android.R.id.statusBarBackground, true);
59 | fade.excludeTarget(android.R.id.navigationBarBackground, true);
60 |
61 | getWindow().setEnterTransition(fade);
62 | getWindow().setExitTransition(fade);
63 | }
64 |
65 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
66 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
67 | this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
68 | drawer.setDrawerListener(toggle);
69 | toggle.syncState();
70 |
71 | NavigationView navigationView = findViewById(R.id.nav_view);
72 | navigationView.setNavigationItemSelectedListener(this);
73 | if (savedInstanceState == null) {
74 | getSupportFragmentManager().beginTransaction()
75 | .replace(R.id.container_about, MainPageFragment.newInstance())
76 | .commit();
77 | navigationView.setCheckedItem(R.id.nav_about);
78 | }
79 |
80 | if (!sharedPreferences.getBoolean("main_activity_target", false)) {
81 | new TapTargetSequence(this)
82 | .continueOnCancel(true)
83 | .targets(
84 | TapTarget.forToolbarNavigationIcon(toolbar, getString(R.string.nav_drawer_target))
85 | .targetCircleColor(R.color.colorAccent)
86 | .drawShadow(true)
87 | .tintTarget(true)
88 | .outerCircleAlpha(0.90f).id(1),
89 | TapTarget.forView(fab, getString(R.string.mentor_target_title), getString(R.string.mentor_target_desc))
90 | .drawShadow(true)
91 | .tintTarget(true)
92 | .targetCircleColor(R.color.colorAccent)
93 | .outerCircleAlpha(0.90f).id(3)
94 |
95 | )
96 | .listener(new TapTargetSequence.Listener() {
97 | @Override
98 | public void onSequenceFinish() {
99 | sharedPreferences.edit().putBoolean("main_activity_target", true).apply();
100 | }
101 |
102 | @Override
103 | public void onSequenceStep(TapTarget lastTarget, boolean targetClicked) {
104 |
105 | }
106 |
107 | @Override
108 | public void onSequenceCanceled(TapTarget lastTarget) {
109 | }
110 | }).start();
111 | }
112 | }
113 |
114 | @Override
115 | protected void onResume() {
116 | super.onResume();
117 | }
118 |
119 | @Override
120 | public void onBackPressed() {
121 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
122 | if (drawer.isDrawerOpen(GravityCompat.START)) {
123 | drawer.closeDrawer(GravityCompat.START);
124 | } else {
125 | drawer.openDrawer(GravityCompat.START);
126 | }
127 | }
128 |
129 | @Override
130 | public boolean onNavigationItemSelected(MenuItem item) {
131 | int id = item.getItemId();
132 | if (id == R.id.nav_about) {
133 | mainPageFragment = MainPageFragment.newInstance();
134 | getSupportFragmentManager().beginTransaction()
135 | .replace(R.id.container_about,
136 | mainPageFragment,
137 | "ABOUT")
138 | .commit();
139 | } else if (id == R.id.nav_organizations) {
140 | organizationFragment = OrganizationFragment.newInstance();
141 | getSupportFragmentManager().beginTransaction()
142 | .replace(R.id.container_about,
143 | organizationFragment,
144 | "ORGANIZATION")
145 | .commit();
146 | } else if (id == R.id.nav_projects) {
147 | projectFragment = ProjectFragment.newInstance("");
148 | getSupportFragmentManager().beginTransaction()
149 | .replace(R.id.container_about,
150 | projectFragment,
151 | "PROJECT")
152 | .commit();
153 | } else if (id == R.id.nav_faq) {
154 | getSupportFragmentManager().beginTransaction()
155 | .replace(R.id.container_about, FaqFragment.newInstance())
156 | .commit();
157 | }
158 |
159 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
160 | drawer.closeDrawer(GravityCompat.START);
161 | return true;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/activities/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.activities;
2 |
3 | import android.content.Intent;
4 | import android.content.SharedPreferences;
5 | import android.os.Bundle;
6 | import android.preference.PreferenceManager;
7 | import android.support.annotation.Nullable;
8 | import android.support.v7.app.AlertDialog;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.widget.Button;
13 | import android.widget.TextView;
14 |
15 | import com.google.gson.Gson;
16 |
17 | import java.io.IOException;
18 | import java.io.InputStream;
19 |
20 | import codingblocks.com.gsocinfo.GSoCApp;
21 | import codingblocks.com.gsocinfo.R;
22 | import codingblocks.com.gsocinfo.data.model.MainPage;
23 | import codingblocks.com.gsocinfo.data.model.Organizations;
24 | import codingblocks.com.gsocinfo.data.model.Projects;
25 |
26 | import static codingblocks.com.gsocinfo.GSoCApp.getProjectDao;
27 |
28 | /**
29 | * Created by harshit on 02/09/17.
30 | */
31 |
32 | public class LoginActivity extends AppCompatActivity {
33 |
34 | private AlertDialog alertDialog;
35 |
36 | @Override
37 | protected void onCreate(@Nullable final Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | setContentView(R.layout.activity_login);
40 | final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
41 | Button button = findViewById(R.id.loginButton);
42 |
43 | // if (sharedPreferences.getBoolean("LOGGED_IN",false)){
44 | // startActivity(new Intent(getBaseContext(), HomeActivity.class));
45 | // finish();
46 | // }
47 | button.setOnClickListener(new View.OnClickListener() {
48 | @Override
49 | public void onClick(View view) {
50 | startActivity(new Intent(getBaseContext(), HomeActivity.class));
51 | sharedPreferences.edit().putBoolean("LOGGED_IN", true).apply();
52 | }
53 | });
54 |
55 | final Gson gson = new Gson();
56 | final View view = LayoutInflater.from(this).inflate(R.layout.dialog_progress, null, false);
57 | ((TextView) view.findViewById(R.id.textViewDialog)).setText(R.string.first_launch_dialog);
58 |
59 | Runnable runnable = new Runnable() {
60 | Organizations organizations;
61 |
62 | @Override
63 | public void run() {
64 | if (!sharedPreferences.getBoolean(getString(R.string.main_page), false)) {
65 | LoginActivity.this.runOnUiThread(new Runnable() {
66 | @Override
67 | public void run() {
68 | alertDialog = new AlertDialog.Builder(LoginActivity.this)
69 | .setMessage("Setting things up, please wait")
70 | .setView(view)
71 | .setCancelable(false)
72 | .setView(view)
73 | .create();
74 | alertDialog.show();
75 | }
76 | });
77 | try {
78 | String json2;
79 | InputStream inputStream2 = null;
80 | inputStream2 = getAssets().open("main_page.json");
81 | int size2 = inputStream2.available();
82 | byte[] buffer2 = new byte[size2];
83 | inputStream2.read(buffer2);
84 | inputStream2.close();
85 | json2 = new String(buffer2, "UTF-8");
86 | Gson gson = new Gson();
87 | MainPage mainPage = gson.fromJson(json2, MainPage.class);
88 | GSoCApp.getMainPageDao().insertData(mainPage.getCopy());
89 | } catch (IOException e) {
90 | e.printStackTrace();
91 | }
92 | }
93 | if (!sharedPreferences.getBoolean(getString(R.string.org_key), false)) {
94 | try {
95 | GSoCApp.getOrgDao().nukeOrgs();
96 | String json;
97 | InputStream inputStream = getAssets().open("org.json");
98 | int size = inputStream.available();
99 | byte[] buffer = new byte[size];
100 | inputStream.read(buffer);
101 | inputStream.close();
102 | json = new String(buffer, "UTF-8");
103 | organizations = gson.fromJson(json, Organizations.class);
104 | GSoCApp.getOrgDao().insertAllOrganization(organizations.getResults());
105 | sharedPreferences.edit().putBoolean(getString(R.string.org_key), true).apply();
106 | } catch (IOException e) {
107 | sharedPreferences.edit().putBoolean(getString(R.string.org_key), false).apply();
108 | e.printStackTrace();
109 | }
110 | }
111 | if (!sharedPreferences.getBoolean(getString(R.string.project_key), false) && !sharedPreferences.getBoolean(getString(R.string.student_key), false)) {
112 | try {
113 | getProjectDao().nukeProjects();
114 | final Projects projects;
115 | String json1;
116 | InputStream inputStream1 = getAssets().open("projects.json");
117 | int size1 = inputStream1.available();
118 | byte[] buffer1 = new byte[size1];
119 | inputStream1.read(buffer1);
120 | inputStream1.close();
121 | json1 = new String(buffer1, "UTF-8");
122 | projects = gson.fromJson(json1, Projects.class);
123 | getProjectDao().insertAllProjects(projects.getResults());
124 | sharedPreferences.edit().putBoolean(getString(R.string.project_key), true).apply();
125 |
126 | } catch (IOException | NullPointerException e) {
127 | e.printStackTrace();
128 | sharedPreferences.edit().putBoolean(getString(R.string.project_key), false).apply();
129 | }
130 | }
131 | LoginActivity.this.runOnUiThread(new Runnable() {
132 | @Override
133 | public void run() {
134 | if (alertDialog.isShowing())
135 | alertDialog.hide();
136 | }
137 | });
138 | }
139 | };
140 | new Thread(runnable).start();
141 | }
142 |
143 | }
144 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/activities/OrgDetailActivity.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.activities;
2 |
3 | import android.content.Intent;
4 | import android.os.Build;
5 | import android.os.Bundle;
6 | import android.support.design.widget.AppBarLayout;
7 | import android.support.design.widget.CollapsingToolbarLayout;
8 | import android.support.design.widget.TabLayout;
9 | import android.support.v4.app.Fragment;
10 | import android.support.v4.app.FragmentManager;
11 | import android.support.v4.app.FragmentPagerAdapter;
12 | import android.support.v4.view.ViewPager;
13 | import android.support.v7.app.AppCompatActivity;
14 | import android.support.v7.widget.Toolbar;
15 | import android.transition.Fade;
16 | import android.view.MenuItem;
17 | import android.widget.ImageView;
18 | import android.widget.TextView;
19 |
20 | import com.squareup.picasso.Callback;
21 | import com.squareup.picasso.Picasso;
22 |
23 | import codingblocks.com.gsocinfo.R;
24 | import codingblocks.com.gsocinfo.data.model.Organization;
25 | import codingblocks.com.gsocinfo.fragments.OrgDetailFragment;
26 | import codingblocks.com.gsocinfo.fragments.ProjectFragment;
27 |
28 | import static codingblocks.com.gsocinfo.adapters.OrgAdapter.ORG_TAG;
29 |
30 | public class OrgDetailActivity extends AppCompatActivity {
31 |
32 | String orgID;
33 | private Organization organization;
34 |
35 | @Override
36 | protected void onCreate(Bundle savedInstanceState) {
37 | super.onCreate(savedInstanceState);
38 | setContentView(R.layout.activity_org_detail);
39 | Intent i = getIntent();
40 | orgID = i.getStringExtra("ORG_ID");
41 | setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
42 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
43 |
44 | organization = (Organization) i.getSerializableExtra(ORG_TAG);
45 | supportPostponeEnterTransition();
46 |
47 | Bundle extras = i.getExtras();
48 |
49 | final CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar);
50 | ImageView orgImage = collapsingToolbarLayout.findViewById(R.id.org_detail_image);
51 |
52 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
53 | Fade fade = new Fade();
54 | fade.excludeTarget(R.id.app_bar_layout, true);
55 | fade.excludeTarget(android.R.id.statusBarBackground, true);
56 | fade.excludeTarget(android.R.id.navigationBarBackground, true);
57 | getWindow().setEnterTransition(fade);
58 | getWindow().setExitTransition(fade);
59 | String imageTransitionName = extras.getString("EXTRA_TRANSITION_NAME");
60 | orgImage.setTransitionName(imageTransitionName);
61 | }
62 |
63 | AppBarLayout appBarLayout = findViewById(R.id.app_bar_layout);
64 | appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
65 | @Override
66 | public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
67 |
68 | if (verticalOffset == 0) {
69 | collapsingToolbarLayout.setTitle(" ");
70 | }
71 | if (Math.abs(verticalOffset) == appBarLayout.getTotalScrollRange())
72 | collapsingToolbarLayout.setTitle(organization.getName());
73 | }
74 | });
75 |
76 | ImageView orgIcon = findViewById(R.id.org_detail_image);
77 | TextView orgDesc = findViewById(R.id.org_detail_desc);
78 |
79 | Picasso.with(this).load(organization.getImageUrl()).into(orgIcon, new Callback() {
80 | @Override
81 | public void onSuccess() {
82 | supportStartPostponedEnterTransition();
83 | }
84 |
85 | @Override
86 | public void onError() {
87 | supportStartPostponedEnterTransition();
88 | }
89 | });
90 | orgDesc.setText(organization.getPrecis());
91 |
92 | ViewPager viewPager = findViewById(R.id.viewPager);
93 | ViewPagerAdapter viewPagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
94 | viewPager.setAdapter(viewPagerAdapter);
95 | TabLayout tabLayout = findViewById(R.id.tabLayout);
96 | tabLayout.setupWithViewPager(viewPager);
97 | }
98 |
99 | @Override
100 | public boolean onOptionsItemSelected(MenuItem item) {
101 | switch (item.getItemId()) {
102 | case android.R.id.home:
103 | super.onBackPressed();
104 | return true;
105 | }
106 | return false;
107 | }
108 |
109 | private class ViewPagerAdapter extends FragmentPagerAdapter {
110 |
111 | public ViewPagerAdapter(FragmentManager fm) {
112 | super(fm);
113 | }
114 |
115 | @Override
116 | public Fragment getItem(int position) {
117 | switch (position) {
118 | case 0:
119 | return OrgDetailFragment.newInstance();
120 | case 1:
121 | return ProjectFragment.newInstance(orgID);
122 | default:
123 | return null;
124 | }
125 | }
126 |
127 | @Override
128 | public CharSequence getPageTitle(int position) {
129 | switch (position) {
130 | case 0:
131 | return getString(R.string.orgTitle);
132 | case 1:
133 | return getString(R.string.orgProject);
134 | }
135 | return null;
136 | }
137 |
138 | @Override
139 | public int getCount() {
140 | return 2;
141 | }
142 | }
143 |
144 | }
145 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/adapters/FaqAdapter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.CardView;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.text.Html;
7 | import android.text.method.LinkMovementMethod;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.LinearLayout;
12 | import android.widget.TextView;
13 |
14 | import java.util.ArrayList;
15 |
16 | import codingblocks.com.gsocinfo.R;
17 |
18 | import static android.view.View.GONE;
19 |
20 | /**
21 | * Created by harshit on 25/08/17.
22 | */
23 |
24 | public class FaqAdapter extends RecyclerView.Adapter {
25 |
26 | private ArrayList questions, answers;
27 | private int lastCheckedPosition = -1;
28 | private Context context;
29 |
30 | public FaqAdapter(ArrayList questions, ArrayList answers) {
31 | this.questions = questions;
32 | this.answers = answers;
33 |
34 | }
35 |
36 | @Override
37 | public FaqHolder onCreateViewHolder(ViewGroup parent, int viewType) {
38 | this.context = parent.getContext();
39 |
40 | return new FaqHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_faq, parent, false));
41 | }
42 |
43 | @Override
44 | public void onBindViewHolder(final FaqHolder holder, int position) {
45 | holder.question.setText(questions.get(position));
46 | holder.answer.setVisibility(GONE);
47 | holder.answer.setText(Html.fromHtml(answers.get(position)));
48 | holder.answer.setClickable(true);
49 | holder.answer.setMovementMethod(LinkMovementMethod.getInstance());
50 | holder.answer.setLinkTextColor(context.getResources().getColor(R.color.colorPrimary));
51 | }
52 |
53 | @Override
54 | public int getItemCount() {
55 | return questions.size();
56 | }
57 |
58 | public class FaqHolder extends RecyclerView.ViewHolder {
59 | LinearLayout linearLayoutFaq;
60 | CardView cardView;
61 | TextView question, answer;
62 |
63 | public FaqHolder(View itemView) {
64 | super(itemView);
65 | cardView = itemView.findViewById(R.id.cardview_faq);
66 | question = itemView.findViewById(R.id.question_faq);
67 | answer = itemView.findViewById(R.id.answer_faq);
68 | linearLayoutFaq = itemView.findViewById(R.id.linearLayoutFaq);
69 | linearLayoutFaq.setOnClickListener(new View.OnClickListener() {
70 | @Override
71 | public void onClick(View view) {
72 | if (answer.isShown()) {
73 | answer.setVisibility(GONE);
74 | }else {
75 | answer.setVisibility(View.VISIBLE);
76 | }
77 | }
78 | });
79 | }
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/adapters/OrgAdapter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.adapters;
2 |
3 | import android.arch.paging.PagedListAdapter;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.support.annotation.NonNull;
7 | import android.support.v4.app.ActivityOptionsCompat;
8 | import android.support.v4.view.ViewCompat;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.support.v7.recyclerview.extensions.DiffCallback;
11 | import android.support.v7.widget.CardView;
12 | import android.support.v7.widget.RecyclerView;
13 | import android.view.LayoutInflater;
14 | import android.view.View;
15 | import android.view.ViewGroup;
16 | import android.widget.ImageView;
17 | import android.widget.TextView;
18 |
19 | import com.squareup.picasso.Picasso;
20 |
21 | import codingblocks.com.gsocinfo.R;
22 | import codingblocks.com.gsocinfo.activities.OrgDetailActivity;
23 | import codingblocks.com.gsocinfo.data.model.Organization;
24 |
25 | /**
26 | * Created by harshit on 26/08/17.
27 | */
28 |
29 | public class OrgAdapter extends PagedListAdapter {
30 |
31 | public static final String ORG_TAG = "ORG";
32 | private static DiffCallback DIFF_CALLBACK = new DiffCallback() {
33 |
34 | @Override
35 | public boolean areItemsTheSame(@NonNull Organization oldItem, @NonNull Organization newItem) {
36 | return oldItem.equals(newItem);
37 | }
38 |
39 | @Override
40 | public boolean areContentsTheSame(@NonNull Organization oldItem, @NonNull Organization newItem) {
41 | return areItemsTheSame(oldItem, newItem);
42 | }
43 | };
44 | private Context context;
45 |
46 | public OrgAdapter() {
47 | super(DIFF_CALLBACK);
48 | }
49 |
50 | @Override
51 | public OrgHolder onCreateViewHolder(ViewGroup parent, int viewType) {
52 | this.context = parent.getContext();
53 | return new OrgHolder(LayoutInflater.from(context).inflate(R.layout.item_org, parent, false));
54 | }
55 |
56 | @Override
57 | public void onBindViewHolder(OrgHolder holder, int position) {
58 | Organization currentOrg = getItem(position);
59 | if (currentOrg != null) {
60 | holder.orgName.setText(currentOrg.getName());
61 | holder.orgTagline.setText(currentOrg.getTagline());
62 | String currUrl = currentOrg.getImageUrl();
63 | Picasso.with(context)
64 | .load(currUrl)
65 | .resize(320, 320)
66 | .into(holder.orgImage);
67 | ViewCompat.setTransitionName(holder.orgImage, currentOrg.getName());
68 |
69 | } else
70 | holder.clear();
71 | }
72 |
73 |
74 | class OrgHolder extends RecyclerView.ViewHolder {
75 |
76 | CardView orgCard;
77 | ImageView orgImage;
78 | TextView orgName, orgTagline;
79 |
80 | public OrgHolder(View itemView) {
81 | super(itemView);
82 | orgImage = itemView.findViewById(R.id.org_image);
83 | orgCard = itemView.findViewById(R.id.card_view_org);
84 | orgName = itemView.findViewById(R.id.org_name);
85 | orgTagline = itemView.findViewById(R.id.org_tagline);
86 |
87 | orgCard.setOnClickListener(new View.OnClickListener() {
88 | @Override
89 | public void onClick(View view) {
90 | Intent i = new Intent(context, OrgDetailActivity.class);
91 | i.putExtra(ORG_TAG, getItem(getAdapterPosition()));
92 | i.putExtra("EXTRA_TRANSITION_NAME", ViewCompat.getTransitionName(orgImage));
93 | ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation((AppCompatActivity) context,
94 | orgImage,
95 | ViewCompat.getTransitionName(orgImage));
96 | i.putExtra("ORG_ID", getItem(getAdapterPosition()).getOrgID());
97 | context.startActivity(i, optionsCompat.toBundle());
98 | }
99 | });
100 | }
101 |
102 | public void clear() {
103 |
104 | }
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/adapters/ProjectAdapter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.adapters;
2 |
3 | import android.arch.paging.PagedListAdapter;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 | import android.support.annotation.NonNull;
8 | import android.support.v7.recyclerview.extensions.DiffCallback;
9 | import android.support.v7.widget.CardView;
10 | import android.support.v7.widget.RecyclerView;
11 | import android.text.Html;
12 | import android.view.LayoutInflater;
13 | import android.view.View;
14 | import android.view.ViewGroup;
15 | import android.widget.ImageButton;
16 | import android.widget.LinearLayout;
17 | import android.widget.TextView;
18 |
19 | import com.commonsware.cwac.anddown.AndDown;
20 |
21 | import codingblocks.com.gsocinfo.R;
22 | import codingblocks.com.gsocinfo.data.model.Project;
23 |
24 | import static android.view.View.GONE;
25 |
26 | /**
27 | * Created by harshit on 26/08/17.
28 | */
29 |
30 | public class ProjectAdapter extends PagedListAdapter {
31 |
32 | private static final DiffCallback DIFF_CALLBACK = new DiffCallback() {
33 | @Override
34 | public boolean areItemsTheSame(@NonNull Project oldItem, @NonNull Project newItem) {
35 | return oldItem.equals(newItem);
36 | }
37 |
38 | @Override
39 | public boolean areContentsTheSame(@NonNull Project oldItem, @NonNull Project newItem) {
40 | return areItemsTheSame(oldItem, newItem);
41 | }
42 | };
43 | private Context context;
44 | private int count = 0; //keeping track of card item created for setting the background
45 |
46 | public ProjectAdapter() {
47 | super(DIFF_CALLBACK);
48 | }
49 |
50 | @Override
51 | public ProjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
52 | this.context = parent.getContext();
53 | View v = LayoutInflater.from(context).inflate(R.layout.item_project, parent, false);
54 | return new ProjectHolder(v);
55 | }
56 |
57 | @Override
58 | public void onBindViewHolder(final ProjectHolder holder, int position) {
59 | holder.linearLayoutExpanded.setVisibility(GONE);
60 | Project currProject = getItem(position);
61 | holder.studentName.setText(currProject.getStudent().getDisplayName());
62 | holder.projectName.setText(currProject.getTitle());
63 | holder.orgName.setText(currProject.getOrganization().getName());
64 | holder.projectMentor.setText("");
65 |
66 | AndDown andDown = new AndDown();
67 | holder.projectDesc.setText(Html.fromHtml(andDown.markdownToHtml(currProject.get_abstract())));
68 | // holder.projectDesc.setText(currProject.get_abstract());
69 | for (int i = 0; i < currProject.getAssigneeDisplayNames().size(); i++) {
70 | if (i == currProject.getAssigneeDisplayNames().size() - 1)
71 | holder.projectMentor.append(currProject.getAssigneeDisplayNames().get(i));
72 | else
73 | holder.projectMentor.append(currProject.getAssigneeDisplayNames().get(i) + ", ");
74 | }
75 | }
76 |
77 |
78 | public class ProjectHolder extends RecyclerView.ViewHolder {
79 |
80 | CardView cardView;
81 | TextView studentName, projectName, projectMentor, orgName, projectDesc, projectTitle;
82 | LinearLayout linearLayoutExpanded, linearLayout;
83 | ImageButton urlImage;
84 |
85 | public ProjectHolder(View itemView) {
86 | super(itemView);
87 | projectDesc = itemView.findViewById(R.id.projectDesc);
88 | studentName = itemView.findViewById(R.id.studentName);
89 | projectName = itemView.findViewById(R.id.projectName);
90 | projectMentor = itemView.findViewById(R.id.mentorName);
91 | orgName = itemView.findViewById(R.id.orgName);
92 | urlImage = itemView.findViewById(R.id.linkImage);
93 | linearLayoutExpanded = itemView.findViewById(R.id.linearLayoutExpanded);
94 | linearLayout = itemView.findViewById(R.id.linearLayoutProject);
95 | cardView = itemView.findViewById(R.id.projectCard);
96 |
97 | switch (count++ % 4) {
98 | case 0:
99 | linearLayout.setBackground(context.getResources().getDrawable(R.drawable.project_bg_one));
100 | linearLayoutExpanded.setBackgroundColor(context.getResources().getColor(R.color.project_one));
101 | break;
102 | case 1:
103 | linearLayout.setBackground(context.getResources().getDrawable(R.drawable.project_bg_two));
104 | linearLayoutExpanded.setBackgroundColor(context.getResources().getColor(R.color.project_two));
105 | break;
106 | case 2:
107 | linearLayout.setBackground(context.getResources().getDrawable(R.drawable.project_bg_three));
108 | linearLayoutExpanded.setBackgroundColor(context.getResources().getColor(R.color.project_three));
109 | break;
110 | case 3:
111 | linearLayout.setBackground(context.getResources().getDrawable(R.drawable.project_bg_four));
112 | linearLayoutExpanded.setBackgroundColor(context.getResources().getColor(R.color.project_four));
113 | break;
114 | }
115 | cardView.setOnClickListener(new View.OnClickListener() {
116 | @Override
117 | public void onClick(View view) {
118 | if (!linearLayoutExpanded.isShown()) {
119 | linearLayoutExpanded.setVisibility(View.VISIBLE);
120 | } else {
121 | linearLayoutExpanded.setVisibility(GONE);
122 | }
123 | }
124 | });
125 | urlImage.setOnClickListener(new View.OnClickListener() {
126 | @Override
127 | public void onClick(View view) {
128 | Project project = getItem(getAdapterPosition());
129 | Intent intent = new Intent(Intent.ACTION_VIEW);
130 | String url = project.getId();
131 | intent.setData(Uri.parse(url));
132 | context.startActivity(intent);
133 | }
134 | });
135 |
136 | }
137 | }
138 |
139 | }
140 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/adapters/TagAdapter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import java.util.List;
11 |
12 | import codingblocks.com.gsocinfo.R;
13 |
14 | /**
15 | * Created by harshit on 27/08/17.
16 | */
17 |
18 | public class TagAdapter extends RecyclerView.Adapter{
19 |
20 | private Context context;
21 | private List orgTags;
22 |
23 | public TagAdapter(List orgTags) {
24 | this.orgTags = orgTags;
25 | }
26 |
27 | @Override
28 | public TagViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
29 | context = parent.getContext();
30 | View v = LayoutInflater.from(context).inflate(R.layout.item_tag,parent,false);
31 | return new TagViewHolder(v);
32 | }
33 |
34 | @Override
35 | public void onBindViewHolder(TagViewHolder holder, int position) {
36 | holder.chipView.setText(orgTags.get(position));
37 | }
38 |
39 | @Override
40 | public int getItemCount() {
41 | return orgTags.size();
42 | }
43 |
44 | public class TagViewHolder extends RecyclerView.ViewHolder{
45 |
46 | TextView chipView;
47 |
48 | public TagViewHolder(View itemView) {
49 | super(itemView);
50 | chipView = itemView.findViewById(R.id.chip_org_detail);
51 | }
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/adapters/TimelineAdapter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.AppCompatTextView;
5 | import android.support.v7.widget.CardView;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import com.github.vipulasri.timelineview.LineType;
12 | import com.github.vipulasri.timelineview.TimelineView;
13 |
14 | import java.util.List;
15 |
16 | import codingblocks.com.gsocinfo.Constants;
17 | import codingblocks.com.gsocinfo.R;
18 | import codingblocks.com.gsocinfo.data.model.MainPage;
19 |
20 | /**
21 | * Created by harshit on 25/08/17.
22 | */
23 |
24 | public class TimelineAdapter extends android.support.v7.widget.RecyclerView.Adapter {
25 |
26 | private static final int HEADER = 123;
27 | private List date = Constants.generateDate(),
28 | title = Constants.generateTitle(),
29 | description = Constants.generateDescription();
30 | private MainPage.Copy mainPage;
31 |
32 | public TimelineAdapter() {
33 | }
34 |
35 | public void setData(MainPage.Copy copy) {
36 | this.mainPage = copy;
37 | notifyDataSetChanged();
38 | }
39 |
40 | @Override
41 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
42 | Context context = parent.getContext();
43 | View view;
44 | if (viewType == HEADER) {
45 | view = View.inflate(context, R.layout.item_card_about, null);
46 | return new AboutHolder(view);
47 | } else {
48 | view = View.inflate(context, R.layout.item_timeline, null);
49 | return new TimelineHolder(view, viewType);
50 | }
51 | }
52 |
53 | @Override
54 | public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
55 | if (holder instanceof TimelineHolder) {
56 | ((TimelineHolder) holder).description.setText(description.get(position));
57 | ((TimelineHolder) holder).title.setText(title.get(position));
58 | ((TimelineHolder) holder).date.setText(date.get(position));
59 | } else if (holder instanceof AboutHolder) {
60 | ((AboutHolder) holder).about.setText(mainPage.getNumberOfStudents() + " STUDENTS, " +
61 | mainPage.getNumberOfStudentCountries() + " COUNTRIES,\n" +
62 | mainPage.getNumberOfYears() + " YEARS, " + mainPage.getNumberOfOrganizations()
63 | + " OPEN SOURCE ORGANIZATIONS");
64 | ((AboutHolder) holder).linesOfCode.setText(mainPage.getNumberOfLinesOfCode());
65 | ((AboutHolder) holder).overView.setText(mainPage.getHomepageIntroParagraph());
66 | }
67 | }
68 |
69 | @Override
70 | public int getItemViewType(int position) {
71 | if (position == 0) {
72 | return HEADER;
73 | } else if (position == getItemCount() - 1) {
74 | return LineType.END;
75 | }
76 | return TimelineView.getTimeLineViewType(position - 1, getItemCount());
77 | }
78 |
79 | @Override
80 | public int getItemCount() {
81 | if (mainPage == null)
82 | return 0;
83 | return date.size();
84 | }
85 |
86 | public class AboutHolder extends RecyclerView.ViewHolder {
87 | TextView overView, linesOfCode, about;
88 |
89 | public AboutHolder(View itemView) {
90 | super(itemView);
91 | overView = itemView.findViewById(R.id.overView);
92 | linesOfCode = itemView.findViewById(R.id.linesOfCode);
93 | about = itemView.findViewById(R.id.textAbout);
94 | }
95 | }
96 |
97 | public class TimelineHolder extends RecyclerView.ViewHolder {
98 |
99 | TimelineView timelineView;
100 | AppCompatTextView title, description, date;
101 | CardView cardView;
102 |
103 | public TimelineHolder(View itemView, int viewType) {
104 | super(itemView);
105 | timelineView = itemView.findViewById(R.id.time_line_item);
106 | title = itemView.findViewById(R.id.text_timeline_title);
107 | description = itemView.findViewById(R.id.text_timeline_description);
108 | date = itemView.findViewById(R.id.text_timeline_date);
109 | cardView = itemView.findViewById(R.id.cardview_timeline);
110 | timelineView.initLine(viewType);
111 | }
112 |
113 | }
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/MainPage.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import android.arch.persistence.room.Entity;
4 | import android.arch.persistence.room.PrimaryKey;
5 | import android.os.Parcel;
6 | import android.os.Parcelable;
7 |
8 | import com.google.gson.annotations.SerializedName;
9 |
10 | import lombok.EqualsAndHashCode;
11 |
12 | /**
13 | * Created by harshit on 01/09/17.
14 | */
15 | public class MainPage {
16 |
17 | public int mainPageId;
18 | private Copy copy;
19 |
20 | public Copy getCopy() {
21 | return copy;
22 | }
23 |
24 | @EqualsAndHashCode
25 | @Entity(tableName = "mainpage")
26 | public static class Copy implements Parcelable{
27 |
28 | public static final Creator CREATOR = new Creator() {
29 | @Override
30 | public Copy createFromParcel(Parcel in) {
31 | return new Copy(in);
32 | }
33 |
34 | @Override
35 | public Copy[] newArray(int size) {
36 | return new Copy[size];
37 | }
38 | };
39 | @PrimaryKey(autoGenerate = true)
40 | public int id;
41 | @SerializedName("number_of_lines_of_code")
42 | private String numberOfLinesOfCode;
43 | @SerializedName("homepage_start_button")
44 | private String homepageStartButton;
45 | @SerializedName("number_of_students")
46 | private String numberOfStudents;
47 | @SerializedName("homepage_intro_paragraph")
48 | private String homepageIntroParagraph;
49 | @SerializedName("number_of_mentors")
50 | private String numberOfMentors;
51 | @SerializedName("number_of_student_and_mentor_countries")
52 | private String numberOfStudentAndMentorCountries;
53 | @SerializedName("number_of_years")
54 | private String numberOfYears;
55 | @SerializedName("number_of_organizations")
56 | private String numberOfOrganizations;
57 | @SerializedName("number_of_student_countries")
58 | private String numberOfStudentCountries;
59 |
60 | public Copy() {
61 | }
62 |
63 | protected Copy(Parcel in) {
64 | id = in.readInt();
65 | numberOfLinesOfCode = in.readString();
66 | homepageStartButton = in.readString();
67 | numberOfStudents = in.readString();
68 | homepageIntroParagraph = in.readString();
69 | numberOfMentors = in.readString();
70 | numberOfStudentAndMentorCountries = in.readString();
71 | numberOfYears = in.readString();
72 | numberOfOrganizations = in.readString();
73 | numberOfStudentCountries = in.readString();
74 | }
75 |
76 | public int getId() {
77 | return id;
78 | }
79 |
80 | public void setId(int id) {
81 | this.id = id;
82 | }
83 |
84 | public String getNumberOfLinesOfCode() {
85 | return numberOfLinesOfCode;
86 | }
87 |
88 | public void setNumberOfLinesOfCode(String numberOfLinesOfCode) {
89 | this.numberOfLinesOfCode = numberOfLinesOfCode;
90 | }
91 |
92 | public String getHomepageStartButton() {
93 | return homepageStartButton;
94 | }
95 |
96 | public void setHomepageStartButton(String homepageStartButton) {
97 | this.homepageStartButton = homepageStartButton;
98 | }
99 |
100 | public String getNumberOfStudents() {
101 | return numberOfStudents;
102 | }
103 |
104 | public void setNumberOfStudents(String numberOfStudents) {
105 | this.numberOfStudents = numberOfStudents;
106 | }
107 |
108 | public String getHomepageIntroParagraph() {
109 | return homepageIntroParagraph;
110 | }
111 |
112 | public void setHomepageIntroParagraph(String homepageIntroParagraph) {
113 | this.homepageIntroParagraph = homepageIntroParagraph;
114 | }
115 |
116 | public String getNumberOfMentors() {
117 | return numberOfMentors;
118 | }
119 |
120 | public void setNumberOfMentors(String numberOfMentors) {
121 | this.numberOfMentors = numberOfMentors;
122 | }
123 |
124 | public String getNumberOfStudentAndMentorCountries() {
125 | return numberOfStudentAndMentorCountries;
126 | }
127 |
128 | public void setNumberOfStudentAndMentorCountries(String numberOfStudentAndMentorCountries) {
129 | this.numberOfStudentAndMentorCountries = numberOfStudentAndMentorCountries;
130 | }
131 |
132 | public String getNumberOfYears() {
133 | return numberOfYears;
134 | }
135 |
136 | public void setNumberOfYears(String numberOfYears) {
137 | this.numberOfYears = numberOfYears;
138 | }
139 |
140 | public String getNumberOfOrganizations() {
141 | return numberOfOrganizations;
142 | }
143 |
144 | public void setNumberOfOrganizations(String numberOfOrganizations) {
145 | this.numberOfOrganizations = numberOfOrganizations;
146 | }
147 |
148 | public String getNumberOfStudentCountries() {
149 | return numberOfStudentCountries;
150 | }
151 |
152 | public void setNumberOfStudentCountries(String numberOfStudentCountries) {
153 | this.numberOfStudentCountries = numberOfStudentCountries;
154 | }
155 |
156 | @Override
157 | public int describeContents() {
158 | return 0;
159 | }
160 |
161 | @Override
162 | public void writeToParcel(Parcel parcel, int i) {
163 | parcel.writeInt(id);
164 | parcel.writeString(numberOfLinesOfCode);
165 | parcel.writeString(homepageStartButton);
166 | parcel.writeString(numberOfStudents);
167 | parcel.writeString(homepageIntroParagraph);
168 | parcel.writeString(numberOfMentors);
169 | parcel.writeString(numberOfStudentAndMentorCountries);
170 | parcel.writeString(numberOfYears);
171 | parcel.writeString(numberOfOrganizations);
172 | parcel.writeString(numberOfStudentCountries);
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/Organization.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import android.arch.persistence.room.Entity;
4 | import android.arch.persistence.room.PrimaryKey;
5 |
6 | import com.google.gson.annotations.SerializedName;
7 |
8 | import java.io.Serializable;
9 | import java.util.ArrayList;
10 |
11 | /**
12 | * Created by harshit on 19/09/17.
13 | */
14 |
15 | @Entity(tableName = "organizations")
16 | public class Organization implements Serializable {
17 |
18 | @PrimaryKey
19 | @SerializedName("id")
20 | private String orgID;
21 | @SerializedName("name")
22 | private String name;
23 | @SerializedName("website_url")
24 | private String websiteUrl;
25 | @SerializedName("category")
26 | private String category;
27 | @SerializedName("contact_email")
28 | private String contactEmail;
29 | @SerializedName("mailing_list")
30 | private String mailingList;
31 | @SerializedName("irc_channel")
32 | private String ircChannel;
33 | @SerializedName("tagline")
34 | private String tagline;
35 | @SerializedName("precis")
36 | private String precis;
37 | @SerializedName("description")
38 | private String description;
39 | @SerializedName("primary_open_source_license")
40 | private String primaryOpenSourceLicense;
41 | @SerializedName("image_url")
42 | private String imageUrl;
43 | @SerializedName("gplus_url")
44 | private String gplusUrl;
45 | @SerializedName("twitter_url")
46 | private String twitterUrl;
47 | @SerializedName("blog_url")
48 | private String blogUrl;
49 | @SerializedName("application_instructions")
50 | private String applicationInstructions;
51 | @SerializedName("topic_tags")
52 | private ArrayList topicTags = null;
53 | @SerializedName("technology_tags")
54 | private ArrayList technologyTags = null;
55 | @SerializedName("proposal_tags")
56 | private ArrayList proposalTags = null;
57 | @SerializedName("ideas_list")
58 | private String ideasList;
59 | @SerializedName("contact_method")
60 | private String contactMethod;
61 |
62 | public Organization() {
63 | }
64 |
65 | @Override
66 | public boolean equals(Object obj) {
67 | if (obj instanceof Organization) {
68 | Organization other = (Organization) obj;
69 |
70 | return (orgID.equals(other.orgID));
71 | }
72 |
73 | return (false);
74 | }
75 |
76 | public String getOrgID() {
77 | return orgID;
78 | }
79 |
80 | public void setOrgID(String orgID) {
81 | this.orgID = orgID;
82 | }
83 |
84 | public String getName() {
85 | return name;
86 | }
87 |
88 | public void setName(String name) {
89 | this.name = name;
90 | }
91 |
92 | public String getWebsiteUrl() {
93 | return websiteUrl;
94 | }
95 |
96 | public void setWebsiteUrl(String websiteUrl) {
97 | this.websiteUrl = websiteUrl;
98 | }
99 |
100 | public String getCategory() {
101 | return category;
102 | }
103 |
104 | public void setCategory(String category) {
105 | this.category = category;
106 | }
107 |
108 | public String getContactEmail() {
109 | return contactEmail;
110 | }
111 |
112 | public void setContactEmail(String contactEmail) {
113 | this.contactEmail = contactEmail;
114 | }
115 |
116 | public String getMailingList() {
117 | return mailingList;
118 | }
119 |
120 | public void setMailingList(String mailingList) {
121 | this.mailingList = mailingList;
122 | }
123 |
124 | public String getIrcChannel() {
125 | return ircChannel;
126 | }
127 |
128 | public void setIrcChannel(String ircChannel) {
129 | this.ircChannel = ircChannel;
130 | }
131 |
132 | public String getTagline() {
133 | return tagline;
134 | }
135 |
136 | public void setTagline(String tagline) {
137 | this.tagline = tagline;
138 | }
139 |
140 | public String getPrecis() {
141 | return precis;
142 | }
143 |
144 | public void setPrecis(String precis) {
145 | this.precis = precis;
146 | }
147 |
148 | public String getDescription() {
149 | return description;
150 | }
151 |
152 | public void setDescription(String description) {
153 | this.description = description;
154 | }
155 |
156 | public String getPrimaryOpenSourceLicense() {
157 | return primaryOpenSourceLicense;
158 | }
159 |
160 | public void setPrimaryOpenSourceLicense(String primaryOpenSourceLicense) {
161 | this.primaryOpenSourceLicense = primaryOpenSourceLicense;
162 | }
163 |
164 | public String getImageUrl() {
165 | return imageUrl;
166 | }
167 |
168 | public void setImageUrl(String imageUrl) {
169 | this.imageUrl = imageUrl;
170 | }
171 |
172 | public String getGplusUrl() {
173 | return gplusUrl;
174 | }
175 |
176 | public void setGplusUrl(String gplusUrl) {
177 | this.gplusUrl = gplusUrl;
178 | }
179 |
180 | public String getTwitterUrl() {
181 | return twitterUrl;
182 | }
183 |
184 | public void setTwitterUrl(String twitterUrl) {
185 | this.twitterUrl = twitterUrl;
186 | }
187 |
188 | public String getBlogUrl() {
189 | return blogUrl;
190 | }
191 |
192 | public void setBlogUrl(String blogUrl) {
193 | this.blogUrl = blogUrl;
194 | }
195 |
196 | public String getApplicationInstructions() {
197 | return applicationInstructions;
198 | }
199 |
200 | public void setApplicationInstructions(String applicationInstructions) {
201 | this.applicationInstructions = applicationInstructions;
202 | }
203 |
204 | public ArrayList getTopicTags() {
205 | return topicTags;
206 | }
207 |
208 | public void setTopicTags(ArrayList topicTags) {
209 | this.topicTags = topicTags;
210 | }
211 |
212 | public ArrayList getTechnologyTags() {
213 | return technologyTags;
214 | }
215 |
216 | public void setTechnologyTags(ArrayList technologyTags) {
217 | this.technologyTags = technologyTags;
218 | }
219 |
220 | public ArrayList getProposalTags() {
221 | return proposalTags;
222 | }
223 |
224 | public void setProposalTags(ArrayList proposalTags) {
225 | this.proposalTags = proposalTags;
226 | }
227 |
228 | public String getIdeasList() {
229 | return ideasList;
230 | }
231 |
232 | public void setIdeasList(String ideasList) {
233 | this.ideasList = ideasList;
234 | }
235 |
236 | public String getContactMethod() {
237 | return contactMethod;
238 | }
239 |
240 | public void setContactMethod(String contactMethod) {
241 | this.contactMethod = contactMethod;
242 | }
243 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/Organizations.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import java.util.ArrayList;
4 |
5 | /**
6 | * Created by harshit on 25/08/17.
7 | */
8 | public class Organizations {
9 |
10 | private ArrayList results;
11 |
12 | public ArrayList getResults() {
13 | return results;
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/Project.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import android.arch.persistence.room.Embedded;
4 | import android.arch.persistence.room.Entity;
5 | import android.arch.persistence.room.PrimaryKey;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | import java.util.ArrayList;
10 |
11 | /**
12 | * Created by harshit on 19/09/17.
13 | */
14 |
15 | @Entity(tableName = "projects")
16 | public class Project {
17 |
18 | @PrimaryKey
19 | @SerializedName("id")
20 | private String projectID;
21 | @SerializedName("title")
22 | private String title;
23 | @SerializedName("subcategory")
24 | private String subcategory;
25 | @SerializedName("organization")
26 | @Embedded
27 | private Organization organization;
28 | @SerializedName("student")
29 | @Embedded
30 | private Student student;
31 | @SerializedName("abstract")
32 | private String _abstract;
33 | @SerializedName("assignee_display_names")
34 | private ArrayList assigneeDisplayNames = null;
35 |
36 | public Project() {
37 | }
38 |
39 | @Override
40 | public boolean equals(Object obj) {
41 | if (obj instanceof Project) {
42 | Project other = (Project) obj;
43 |
44 | return (projectID.equals(other.projectID));
45 | }
46 |
47 | return (false);
48 | }
49 |
50 | public String getProjectID() {
51 | return projectID;
52 | }
53 |
54 | public void setProjectID(String projectID) {
55 | this.projectID = projectID;
56 | }
57 |
58 | public String getTitle() {
59 | return title;
60 | }
61 |
62 | public void setTitle(String title) {
63 | this.title = title;
64 | }
65 |
66 | public String getSubcategory() {
67 | return subcategory;
68 | }
69 |
70 | public void setSubcategory(String subcategory) {
71 | this.subcategory = subcategory;
72 | }
73 |
74 | public Organization getOrganization() {
75 | return organization;
76 | }
77 |
78 | public void setOrganization(Organization organization) {
79 | this.organization = organization;
80 | }
81 |
82 | public Student getStudent() {
83 | return student;
84 | }
85 |
86 | public void setStudent(Student student) {
87 | this.student = student;
88 | }
89 |
90 | public String get_abstract() {
91 | return _abstract;
92 | }
93 |
94 | public void set_abstract(String _abstract) {
95 | this._abstract = _abstract;
96 | }
97 |
98 | public ArrayList getAssigneeDisplayNames() {
99 | return assigneeDisplayNames;
100 | }
101 |
102 | public void setAssigneeDisplayNames(ArrayList assigneeDisplayNames) {
103 | this.assigneeDisplayNames = assigneeDisplayNames;
104 | }
105 |
106 | public String getId() {
107 | return "https://summerofcode.withgoogle.com/projects/#" + projectID;
108 | }
109 |
110 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/Projects.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | import java.util.ArrayList;
6 |
7 | /**
8 | * Created by harshit on 25/08/17.
9 | */
10 | public class Projects {
11 |
12 | @SerializedName("count")
13 | private Integer count;
14 | @SerializedName("next")
15 | private String next;
16 | @SerializedName("previous")
17 | private String previous;
18 | @SerializedName("results")
19 |
20 | private ArrayList results;
21 |
22 | public Integer getCount() {
23 | return count;
24 | }
25 |
26 | public String getNext() {
27 | return next;
28 | }
29 |
30 | public Object getPrevious() {
31 | return previous;
32 | }
33 |
34 | public ArrayList getResults() {
35 | return results;
36 | }
37 |
38 | /*
39 | Not needed since @Embedded handles this automatically
40 |
41 | @Entity(tableName = "projects",
42 | foreignKeys = {@ForeignKey(entity = Student.class,
43 | parentColumns = "studentID",
44 | childColumns = "student_id",
45 | onDelete = CASCADE),
46 | @ForeignKey(entity = Organization.class,
47 | parentColumns = "orgID",
48 | childColumns = "org_id",
49 | onDelete = CASCADE)
50 | }
51 | )
52 | */
53 |
54 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/model/Student.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.model;
2 |
3 | import android.arch.persistence.room.Entity;
4 | import android.arch.persistence.room.PrimaryKey;
5 |
6 | import com.google.gson.annotations.SerializedName;
7 |
8 | import lombok.EqualsAndHashCode;
9 |
10 | /**
11 | * Created by harshit on 08/09/17.
12 | */
13 |
14 | @EqualsAndHashCode
15 | @Entity(tableName = "students")
16 | public class Student {
17 |
18 | @SerializedName("id")
19 | @PrimaryKey
20 | private long studentID;
21 | @SerializedName("display_name")
22 | private String displayName;
23 |
24 | public long getStudentID() {
25 | return studentID;
26 | }
27 |
28 | public void setStudentID(long studentID) {
29 | this.studentID = studentID;
30 | }
31 |
32 | public String getDisplayName() {
33 | return displayName;
34 | }
35 |
36 | public void setDisplayName(String displayName) {
37 | this.displayName = displayName;
38 | }
39 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/viewmodel/MainPageViewModel.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.viewmodel;
2 |
3 | import android.app.Application;
4 | import android.arch.lifecycle.AndroidViewModel;
5 | import android.arch.lifecycle.LiveData;
6 |
7 | import codingblocks.com.gsocinfo.GSoCApp;
8 | import codingblocks.com.gsocinfo.data.model.MainPage;
9 |
10 | /**
11 | * Created by harshit on 17/09/17.
12 | */
13 |
14 | public class MainPageViewModel extends AndroidViewModel {
15 |
16 | private LiveData mainPageCopy;
17 |
18 | public MainPageViewModel(Application application) {
19 | super(application);
20 | mainPageCopy = GSoCApp.getMainPageDao().getData();
21 | }
22 |
23 | public LiveData getMainPageCopy() {
24 | return mainPageCopy;
25 | }
26 |
27 | public void setMainPageCopy(LiveData mainPageCopy) {
28 | this.mainPageCopy = mainPageCopy;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/viewmodel/OrganizationViewModel.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.viewmodel;
2 |
3 | import android.app.Application;
4 | import android.arch.lifecycle.AndroidViewModel;
5 | import android.arch.lifecycle.LiveData;
6 | import android.arch.paging.PagedList;
7 |
8 | import codingblocks.com.gsocinfo.GSoCApp;
9 | import codingblocks.com.gsocinfo.data.model.Organization;
10 |
11 | /**
12 | * Created by harshit on 17/09/17.
13 | */
14 |
15 | public class OrganizationViewModel extends AndroidViewModel {
16 |
17 | public LiveData> organizations;
18 |
19 | public OrganizationViewModel(Application application) {
20 | super(application);
21 | organizations = GSoCApp.getOrgDao().getAllOrganizations()
22 | .create(null, new PagedList.Config.Builder()
23 | .setPageSize(30)
24 | .setPrefetchDistance(10)
25 | .build());
26 | }
27 |
28 | public LiveData> getOrganizations() {
29 | return organizations;
30 | }
31 |
32 | public void setOrganizations(LiveData> organizations) {
33 | this.organizations = organizations;
34 | }
35 |
36 | public LiveData> getOrgsByName(String name) {
37 | return GSoCApp.getOrgDao().getOrgsByName(name)
38 | .create(null, new PagedList.Config.Builder()
39 | .setPageSize(50)
40 | .setPrefetchDistance(10)
41 | .build());
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/data/viewmodel/ProjectViewModel.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.data.viewmodel;
2 |
3 | import android.app.Application;
4 | import android.arch.lifecycle.AndroidViewModel;
5 | import android.arch.lifecycle.LiveData;
6 | import android.arch.paging.PagedList;
7 |
8 | import codingblocks.com.gsocinfo.GSoCApp;
9 | import codingblocks.com.gsocinfo.data.model.Project;
10 |
11 | /**
12 | * Created by harshit on 17/09/17.
13 | */
14 |
15 | public class ProjectViewModel extends AndroidViewModel {
16 |
17 | private LiveData> projects;
18 |
19 | public ProjectViewModel(Application application) {
20 | super(application);
21 | projects = GSoCApp.getProjectDao().getAllProjects().create(null, 50);
22 | }
23 |
24 | public LiveData> getProjects() {
25 | return projects;
26 | }
27 |
28 | public void setProjects(LiveData> projects) {
29 | this.projects = projects;
30 | }
31 |
32 | public LiveData> getProjectsByOrgID(String id) {
33 | return GSoCApp.getProjectDao().getProjectByOrgId(id).create(null, 50);
34 | }
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/db/AppDatabase.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.db;
2 |
3 | import android.arch.persistence.room.Database;
4 | import android.arch.persistence.room.RoomDatabase;
5 | import android.arch.persistence.room.TypeConverters;
6 |
7 | import codingblocks.com.gsocinfo.data.model.MainPage;
8 | import codingblocks.com.gsocinfo.data.model.Organization;
9 | import codingblocks.com.gsocinfo.data.model.Project;
10 | import codingblocks.com.gsocinfo.db.dao.MainPageDao;
11 | import codingblocks.com.gsocinfo.db.dao.OrganizationDao;
12 | import codingblocks.com.gsocinfo.db.dao.ProjectDao;
13 |
14 | /**
15 | * Created by harshit on 08/09/17.
16 | */
17 | @Database(entities = {Organization.class, Project.class, MainPage.Copy.class}, version = 2)
18 | @TypeConverters(Converter.class)
19 | public abstract class AppDatabase extends RoomDatabase {
20 |
21 | public abstract ProjectDao getProjectsDao();
22 |
23 | public abstract OrganizationDao getOrganizationsDao();
24 |
25 | public abstract MainPageDao getMainPageDao();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/db/Converter.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.db;
2 |
3 | import android.arch.persistence.room.TypeConverter;
4 |
5 | import com.google.gson.Gson;
6 | import com.google.gson.reflect.TypeToken;
7 |
8 | import java.lang.reflect.Type;
9 | import java.util.ArrayList;
10 |
11 | /**
12 | * Created by harshit on 08/09/17.
13 | */
14 |
15 | public class Converter {
16 | @TypeConverter
17 | public static ArrayList fromString(String value) {
18 | Type listType = new TypeToken>() {}.getType();
19 | return new Gson().fromJson(value, listType);
20 | }
21 |
22 | @TypeConverter
23 | public static String fromArrayLisr(ArrayList list) {
24 | Gson gson = new Gson();
25 | return gson.toJson(list);
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/db/dao/MainPageDao.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.db.dao;
2 |
3 | import android.arch.lifecycle.LiveData;
4 | import android.arch.persistence.room.Dao;
5 | import android.arch.persistence.room.Insert;
6 | import android.arch.persistence.room.Query;
7 |
8 | import codingblocks.com.gsocinfo.data.model.MainPage;
9 |
10 | /**
11 | * Created by harshit on 08/09/17.
12 | */
13 | @Dao
14 | public interface MainPageDao {
15 |
16 | @Query("SELECT * FROM mainpage")
17 | LiveData getData();
18 |
19 | @Insert
20 | void insertData(MainPage.Copy copy);
21 |
22 | @Query("DELETE FROM mainpage")
23 | void nukeProjects();
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/db/dao/OrganizationDao.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.db.dao;
2 |
3 | import android.arch.paging.LivePagedListProvider;
4 | import android.arch.persistence.room.Dao;
5 | import android.arch.persistence.room.Delete;
6 | import android.arch.persistence.room.Insert;
7 | import android.arch.persistence.room.Query;
8 |
9 | import java.util.List;
10 |
11 | import codingblocks.com.gsocinfo.data.model.Organization;
12 |
13 | /**
14 | * Created by harshit on 08/09/17.
15 | */
16 | @Dao
17 | public interface OrganizationDao {
18 |
19 | @Query("SELECT * FROM organizations ORDER BY name")
20 | LivePagedListProvider, Organization> getAllOrganizations();
21 |
22 | @Insert
23 | void insertAllOrganization(List organizations);
24 |
25 | @Delete
26 | void deleteAllOrganizations(List organizations);
27 |
28 | @Query("SELECT * FROM organizations WHERE name like '%' || :name || '%' OR " +
29 | "topicTags like '%' || :name || '%' OR technologyTags like '%' || :name || '%' OR" +
30 | " proposalTags like '%' || :name || '%' ORDER BY name")
31 | LivePagedListProvider, Organization> getOrgsByName(String name);
32 |
33 | @Query("DELETE FROM organizations")
34 | void nukeOrgs();
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/db/dao/ProjectDao.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.db.dao;
2 |
3 | import android.arch.paging.LivePagedListProvider;
4 | import android.arch.persistence.room.Dao;
5 | import android.arch.persistence.room.Delete;
6 | import android.arch.persistence.room.Insert;
7 | import android.arch.persistence.room.Query;
8 |
9 | import java.util.List;
10 |
11 | import codingblocks.com.gsocinfo.data.model.Project;
12 |
13 | /**
14 | * Created by harshit on 08/09/17.
15 | */
16 | @Dao
17 | public interface ProjectDao {
18 |
19 | @Query("SELECT * FROM projects ORDER BY title")
20 | LivePagedListProvider, Project> getAllProjects();
21 |
22 | @Query("SELECT * FROM projects WHERE orgID = :id")
23 | LivePagedListProvider, Project> getProjectByOrgId(String id);
24 |
25 | @Insert
26 | void insertAllProjects(List projects);
27 |
28 | @Insert
29 | void insertSingleProject(Project... project);
30 |
31 | @Delete
32 | void deleteAllProjects(List projects);
33 |
34 | @Query("DELETE FROM projects")
35 | void nukeProjects();
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/ChatFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | /**
11 | * Created by harshit on 04/09/17.
12 | */
13 |
14 | public class ChatFragment extends Fragment {
15 |
16 | public static ChatFragment newInstance() {
17 |
18 | Bundle args = new Bundle();
19 |
20 | ChatFragment fragment = new ChatFragment();
21 | fragment.setArguments(args);
22 | return fragment;
23 | }
24 |
25 | @Nullable
26 | @Override
27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
28 | return super.onCreateView(inflater, container, savedInstanceState);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/FaqFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v7.widget.LinearLayoutManager;
7 | import android.support.v7.widget.RecyclerView;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.view.animation.Animation;
12 | import android.view.animation.AnimationUtils;
13 |
14 | import codingblocks.com.gsocinfo.Constants;
15 | import codingblocks.com.gsocinfo.R;
16 | import codingblocks.com.gsocinfo.adapters.FaqAdapter;
17 |
18 | /**
19 | * Created by harshit on 25/08/17.
20 | */
21 |
22 | public class FaqFragment extends Fragment {
23 |
24 | public static FaqFragment newInstance() {
25 |
26 | Bundle args = new Bundle();
27 |
28 | FaqFragment fragment = new FaqFragment();
29 | fragment.setArguments(args);
30 | return fragment;
31 | }
32 |
33 | @Nullable
34 | @Override
35 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
36 | View view = inflater.inflate(R.layout.fragment_faq, container, false);
37 |
38 | RecyclerView generalRv = view.findViewById(R.id.rv_general_faq);
39 | FaqAdapter faqAdapter = new FaqAdapter(Constants.getGeneralQuestions(), Constants.getGeneralAnswers());
40 | generalRv.setLayoutManager(new LinearLayoutManager(getContext()));
41 |
42 | generalRv.setAdapter(faqAdapter);
43 |
44 | return view;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/MainPageFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.arch.lifecycle.Observer;
4 | import android.arch.lifecycle.ViewModelProviders;
5 | import android.os.Bundle;
6 | import android.support.annotation.Nullable;
7 | import android.support.v4.app.Fragment;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 |
14 | import codingblocks.com.gsocinfo.R;
15 | import codingblocks.com.gsocinfo.adapters.TimelineAdapter;
16 | import codingblocks.com.gsocinfo.data.model.MainPage;
17 | import codingblocks.com.gsocinfo.data.viewmodel.MainPageViewModel;
18 |
19 | /**
20 | * Created by harshit on 25/08/17.
21 | */
22 |
23 | public class MainPageFragment extends Fragment {
24 |
25 | private TimelineAdapter timelineAdapter;
26 | private MainPage.Copy copy;
27 |
28 | public static MainPageFragment newInstance() {
29 | Bundle args = new Bundle();
30 |
31 | MainPageFragment fragment = new MainPageFragment();
32 | fragment.setArguments(args);
33 | return fragment;
34 | }
35 |
36 | @Nullable
37 | @Override
38 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
39 | View view = inflater.inflate(R.layout.fragment_about, container, false);
40 | RecyclerView recyclerView = view.findViewById(R.id.rv_timeline);
41 | recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
42 |
43 | MainPageViewModel mainPageViewModel = ViewModelProviders.of(getActivity()).get(MainPageViewModel.class);
44 | timelineAdapter = new TimelineAdapter();
45 | recyclerView.setAdapter(timelineAdapter);
46 | mainPageViewModel.getMainPageCopy().observe(this, new Observer() {
47 | @Override
48 | public void onChanged(@Nullable MainPage.Copy copy) {
49 | timelineAdapter.setData(copy);
50 | }
51 | });
52 | return view;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/OrgDetailFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.support.v7.widget.RecyclerView;
8 | import android.support.v7.widget.StaggeredGridLayoutManager;
9 | import android.text.Html;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.TextView;
14 |
15 | import com.commonsware.cwac.anddown.AndDown;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | import codingblocks.com.gsocinfo.R;
21 | import codingblocks.com.gsocinfo.adapters.TagAdapter;
22 | import codingblocks.com.gsocinfo.data.model.Organization;
23 |
24 | import static codingblocks.com.gsocinfo.adapters.OrgAdapter.ORG_TAG;
25 |
26 | /**
27 | * Created by harshit on 27/08/17.
28 | */
29 |
30 | public class OrgDetailFragment extends Fragment {
31 |
32 | public static OrgDetailFragment newInstance() {
33 |
34 | Bundle args = new Bundle();
35 |
36 | OrgDetailFragment fragment = new OrgDetailFragment();
37 | fragment.setArguments(args);
38 | return fragment;
39 | }
40 |
41 | @Nullable
42 | @Override
43 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
44 | View view = inflater.inflate(R.layout.fragment_org_details,container,false);
45 | Intent i = getActivity().getIntent();
46 | Organization organization = (Organization) i.getSerializableExtra(ORG_TAG);
47 |
48 | TextView orgDetails = view.findViewById(R.id.org_detail_details);
49 | TextView orgTitle = view.findViewById(R.id.org_detail_title);
50 |
51 | AndDown andDown=new AndDown();
52 |
53 | String orgDesc = organization.getDescription();
54 | // .replaceAll("(\\? )|(\\! )|(\\. )", "$0\n"); //Replace every period with newline
55 |
56 | orgDesc = andDown.markdownToHtml(orgDesc); //Todo : do this while inserting to db
57 |
58 | orgDetails.setText(Html.fromHtml(orgDesc));
59 | orgTitle.setText(organization.getTagline());
60 | RecyclerView techRv = view.findViewById(R.id.techTagRecyclerView);
61 | TagAdapter techAdapter;
62 | List tags = new ArrayList<>();
63 |
64 | tags.addAll(organization.getTechnologyTags());
65 | tags.addAll(organization.getTopicTags());
66 | tags.addAll(organization.getProposalTags());
67 | techAdapter = new TagAdapter(tags);
68 |
69 | techRv.setLayoutManager(new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.HORIZONTAL));
70 | techRv.setAdapter(techAdapter);
71 |
72 | return view;
73 | }
74 |
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/OrganizationFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.arch.lifecycle.Observer;
4 | import android.arch.lifecycle.ViewModelProviders;
5 | import android.arch.paging.PagedList;
6 | import android.os.Bundle;
7 | import android.support.annotation.Nullable;
8 | import android.support.v4.app.Fragment;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.support.v7.widget.SearchView;
11 | import android.support.v7.widget.StaggeredGridLayoutManager;
12 | import android.util.DisplayMetrics;
13 | import android.view.LayoutInflater;
14 | import android.view.Menu;
15 | import android.view.MenuInflater;
16 | import android.view.MenuItem;
17 | import android.view.View;
18 | import android.view.ViewGroup;
19 |
20 | import codingblocks.com.gsocinfo.R;
21 | import codingblocks.com.gsocinfo.adapters.OrgAdapter;
22 | import codingblocks.com.gsocinfo.data.model.Organization;
23 | import codingblocks.com.gsocinfo.data.viewmodel.OrganizationViewModel;
24 |
25 | /**
26 | * Created by harshit on 25/08/17.
27 | */
28 |
29 | public class OrganizationFragment extends Fragment {
30 |
31 | public PagedList orgPagedList;
32 | OrganizationViewModel organizationViewModel;
33 | private OrgAdapter orgAdapter;
34 |
35 | public static OrganizationFragment newInstance() {
36 | Bundle args = new Bundle();
37 | OrganizationFragment fragment = new OrganizationFragment();
38 | fragment.setArguments(args);
39 | return fragment;
40 | }
41 |
42 | @Override
43 | public boolean onOptionsItemSelected(MenuItem item) {
44 | return super.onOptionsItemSelected(item);
45 | }
46 |
47 | @Override
48 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
49 | inflater.inflate(R.menu.about, menu);
50 | SearchView searchView;
51 | MenuItem searchMenuItem = menu.findItem(R.id.action_search);
52 | searchView = (SearchView) searchMenuItem.getActionView();
53 | searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
54 | @Override
55 | public boolean onQueryTextSubmit(String query) {
56 | // organizationViewModel = ViewModelProviders.of(getActivity()).get(OrganizationViewModel.class);
57 | organizationViewModel.getOrgsByName(query).observe(getActivity(), new Observer>() {
58 | @Override
59 | public void onChanged(@Nullable PagedList organizations) {
60 | orgAdapter.setList(organizations);
61 | }
62 | });
63 | return false;
64 | }
65 |
66 | @Override
67 | public boolean onQueryTextChange(String newText) {
68 | if (newText.equals("")) {
69 | orgAdapter.setList(orgPagedList);
70 | }
71 | return false;
72 | }
73 | });
74 | }
75 |
76 | @Nullable
77 | @Override
78 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
79 | final View view = inflater.inflate(R.layout.fragment_org, container, false);
80 | RecyclerView recyclerView = view.findViewById(R.id.rv_org);
81 | DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
82 | float width = displayMetrics.widthPixels / displayMetrics.density;
83 | final int spanCount = (int) (width / 180.00);
84 | recyclerView.setLayoutManager(new StaggeredGridLayoutManager(spanCount, StaggeredGridLayoutManager.VERTICAL));
85 | orgAdapter = new OrgAdapter();
86 | recyclerView.setAdapter(orgAdapter);
87 | organizationViewModel = ViewModelProviders.of(getActivity()).get(OrganizationViewModel.class);
88 | setHasOptionsMenu(true);
89 | organizationViewModel.getOrganizations().observe(this, new Observer>() {
90 | @Override
91 | public void onChanged(@Nullable PagedList organizations) {
92 | orgPagedList = organizations;
93 | orgAdapter.setList(orgPagedList);
94 | view.findViewById(R.id.progressBar).setVisibility(View.GONE);
95 | }
96 | });
97 |
98 | return view;
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/ProjectFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.arch.lifecycle.Observer;
4 | import android.arch.lifecycle.ViewModelProviders;
5 | import android.arch.paging.PagedList;
6 | import android.os.Bundle;
7 | import android.support.annotation.Nullable;
8 | import android.support.v4.app.Fragment;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.support.v7.widget.StaggeredGridLayoutManager;
11 | import android.util.DisplayMetrics;
12 | import android.view.LayoutInflater;
13 | import android.view.View;
14 | import android.view.ViewGroup;
15 |
16 | import codingblocks.com.gsocinfo.R;
17 | import codingblocks.com.gsocinfo.adapters.ProjectAdapter;
18 | import codingblocks.com.gsocinfo.data.model.Project;
19 | import codingblocks.com.gsocinfo.data.viewmodel.ProjectViewModel;
20 |
21 | /**
22 | * Created by harshit on 31/08/17.
23 | */
24 |
25 | public class ProjectFragment extends Fragment {
26 |
27 | private ProjectAdapter projectAdapter;
28 |
29 | public static ProjectFragment newInstance(String orgID) {
30 | Bundle args = new Bundle();
31 | args.putString("ORG", orgID);
32 | ProjectFragment fragment = new ProjectFragment();
33 | fragment.setArguments(args);
34 | return fragment;
35 | }
36 |
37 | @Nullable
38 | @Override
39 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
40 | final View view = inflater.inflate(R.layout.fragment_project, container, false);
41 |
42 | RecyclerView recyclerView = view.findViewById(R.id.rv_projects);
43 | DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
44 | float width = displayMetrics.widthPixels / displayMetrics.density;
45 | final int spanCount = (int) (width / 240.00);
46 |
47 | final StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(spanCount, StaggeredGridLayoutManager.VERTICAL);
48 | recyclerView.setLayoutManager(staggeredGridLayoutManager);
49 | projectAdapter = new ProjectAdapter();
50 |
51 | ProjectViewModel projectViewModel = ViewModelProviders.of(getActivity()).get(ProjectViewModel.class);
52 | String orgID = getArguments().getString("ORG");
53 | if (orgID != null && !orgID.equals("")) {
54 | projectViewModel.getProjectsByOrgID(orgID).observe(this, new Observer>() {
55 | @Override
56 | public void onChanged(@Nullable PagedList projects) {
57 | projectAdapter.setList(projects);
58 | projectAdapter.notifyDataSetChanged();
59 | view.findViewById(R.id.progressBar).setVisibility(View.GONE);
60 | }
61 | });
62 | } else {
63 | projectViewModel.getProjects().observe(this, new Observer>() {
64 | @Override
65 | public void onChanged(@Nullable PagedList projects) {
66 | projectAdapter.setList(projects);
67 | projectAdapter.notifyDataSetChanged();
68 | view.findViewById(R.id.progressBar).setVisibility(View.GONE);
69 | }
70 | });
71 | }
72 |
73 | recyclerView.setAdapter(projectAdapter);
74 |
75 | return view;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/codingblocks/com/gsocinfo/fragments/RequestFragment.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | /**
11 | * Created by harshit on 04/09/17.
12 | */
13 |
14 | public class RequestFragment extends Fragment {
15 |
16 | public static RequestFragment newInstance() {
17 |
18 | Bundle args = new Bundle();
19 |
20 | RequestFragment fragment = new RequestFragment();
21 | fragment.setArguments(args);
22 | return fragment;
23 | }
24 |
25 | @Nullable
26 | @Override
27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
28 | return super.onCreateView(inflater, container, savedInstanceState);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/apply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/apply.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_card_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/bg_card_code.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_globe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/bg_globe.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_mountains.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/bg_mountains.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bordered_translucent_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/chip.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cloud_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/cloud_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cloud_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/cloud_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/code.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/globe_flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/globe_flag.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/green_landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/green_landscape.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home_banner_world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/home_banner_world.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dashboard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/marker.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/moon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/moon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mountains_landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/mountains_landscape.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/project_bg_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/project_bg_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/project_bg_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/project_bg_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_four.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_three.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_bg_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/project_link.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/satellite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/satellite.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/share.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/stars_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/stars_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/stars_with_bg.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/summer_of_code_logo.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
18 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/telescope.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/drawable/telescope.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_org_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
25 |
26 |
30 |
31 |
32 |
39 |
40 |
48 |
49 |
54 |
55 |
61 |
62 |
72 |
73 |
74 |
75 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
23 |
24 |
34 |
35 |
39 |
40 |
44 |
45 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_faq.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_org.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_org_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
19 |
20 |
24 |
25 |
31 |
32 |
39 |
40 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_card_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
19 |
20 |
27 |
28 |
33 |
34 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_faq.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
22 |
23 |
29 |
30 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_org.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
22 |
23 |
30 |
31 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_project.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
18 |
19 |
24 |
25 |
33 |
34 |
41 |
42 |
49 |
50 |
56 |
57 |
64 |
65 |
71 |
72 |
81 |
82 |
83 |
84 |
92 |
93 |
100 |
101 |
110 |
111 |
112 |
113 |
114 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_timeline.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
19 |
20 |
36 |
37 |
43 |
44 |
50 |
51 |
58 |
59 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_timeline_summary.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
19 |
20 |
25 |
26 |
32 |
33 |
42 |
43 |
50 |
51 |
52 |
53 |
54 |
58 |
59 |
64 |
65 |
71 |
72 |
81 |
82 |
89 |
90 |
91 |
92 |
93 |
96 |
102 |
109 |
119 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/about.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_about_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #213754
4 | #0E1926
5 | #FCBC05
6 | #4DFCBC05
7 | #ffffff
8 | #4CAF50
9 | #388E3C
10 | #FF5722
11 | #AAFF5722
12 | #ffffff
13 | #38114E
14 | #075962
15 | #685D82
16 | #06404E
17 | #0F3A4C
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 160dp
7 | 16dp
8 | 36dp
9 | 6dp
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | GSoCInfo
3 | AboutActivity
4 |
5 | Open navigation drawer
6 | Close navigation drawer
7 |
8 | Settings
9 |
10 |
11 | Hello world!
12 |
13 |
14 | User already logged in
15 | Sign in with Facebook
16 | Sign in with Google
17 | Sign out
18 | 116092692359761
19 | fb116092692359761
20 | 309026882172-bckgevviebb7kveqskk3geglhmikb5sm.apps.googleusercontent.comstring
21 | OrgDetailActivity
22 | Home
23 | Dashboard
24 | Notifications
25 | Organization
26 | Projects
27 | ORGANIZATIONS
28 | PROJECTS
29 | STUDENTS
30 | MAIN_PAGE
31 | Settings things up for the first launch, please wait …
32 | Click here to view more sections in the app
33 | This allows you to search for any content throughout the app
34 | Click here to search
35 | Click here to chat with a mentor
36 | Chat with mentors and students who participated in GSoC
37 | Search
38 | SearchActivity
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
25 |
26 |
30 |
31 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/searchable.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/web_hi_res_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/app/src/main/web_hi_res_512.png
--------------------------------------------------------------------------------
/app/src/test/java/codingblocks/com/gsocinfo/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package codingblocks.com.gsocinfo;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.google.firebase:firebase-plugins:1.1.1'
9 | classpath 'com.android.tools.build:gradle:2.3.3'
10 | }
11 | }
12 |
13 | allprojects {
14 | repositories {
15 | jcenter()
16 | maven {
17 | url "https://maven.google.com"
18 | }
19 | maven {
20 | url "https://s3.amazonaws.com/repo.commonsware.com"
21 | }
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks/GSoC-Info-Android/43a53f1c811cb0781cc34dfa7b8b1e40011d23c7/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Aug 25 02:03:52 IST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/lombok.config:
--------------------------------------------------------------------------------
1 | lombok.addGeneratedAnnotation = false
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------