-
-
Notifications
You must be signed in to change notification settings - Fork 106
contributors name added to about page #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aniket691
wants to merge
3
commits into
adeekshith:main
Choose a base branch
from
aniket691:repo-contributors-display-on-about-page
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
app/src/main/java/com/parishod/watomatic/activity/about/AboutActivity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| package com.parishod.watomatic.activity.about; | ||
|
|
||
| import android.content.Intent; | ||
| import android.net.Uri; | ||
| import android.os.Bundle; | ||
| import android.view.View; | ||
| import android.widget.TextView; | ||
| import android.widget.Toast; | ||
|
|
||
| import androidx.appcompat.app.AppCompatActivity; | ||
|
|
||
| import com.parishod.watomatic.R; | ||
| import com.parishod.watomatic.model.githubUesrsResponse.GithubUsersResponse; | ||
| import com.parishod.watomatic.network.GetGitUserInterface; | ||
| import com.parishod.watomatic.network.RetrofitInstance; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import retrofit2.Call; | ||
| import retrofit2.Callback; | ||
| import retrofit2.Response; | ||
| import retrofit2.Retrofit; | ||
|
|
||
| public class AboutActivity extends AppCompatActivity implements View.OnClickListener { | ||
|
|
||
| private TextView text_view; | ||
| private String all_contributers = ""; | ||
| private TextView privacy_policy; | ||
| private TextView developer_link; | ||
|
|
||
| @Override | ||
| protected void onCreate(Bundle savedInstanceState) { | ||
| super.onCreate(savedInstanceState); | ||
| setContentView(R.layout.activity_about); | ||
|
|
||
| text_view = findViewById(R.id.contributers); | ||
| privacy_policy = findViewById(R.id.privacyPolicyLabel); | ||
| developer_link = findViewById(R.id.developerLink); | ||
|
|
||
| privacy_policy.setOnClickListener(this); | ||
| developer_link.setOnClickListener(this); | ||
| Retrofit retrofit = RetrofitInstance.getRetrofitInstance(); | ||
| GetGitUserInterface getGitUserInterface = retrofit.create(GetGitUserInterface.class); | ||
|
|
||
| Call<List<GithubUsersResponse>> call = getGitUserInterface.getContriUsers(); | ||
| call.enqueue(new Callback<List<GithubUsersResponse>>() { | ||
| @Override | ||
| public void onResponse(Call<List<GithubUsersResponse>> call, Response<List<GithubUsersResponse>> response) { | ||
| if (response.isSuccessful()) { | ||
| List<GithubUsersResponse> list = response.body(); | ||
| for (GithubUsersResponse i : list) { | ||
| all_contributers += i.getLogin() + ", "; | ||
| } | ||
| text_view.setText(all_contributers); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void onFailure(Call<List<GithubUsersResponse>> call, Throwable t) { | ||
| Toast.makeText(getApplicationContext(), t.getMessage(), Toast.LENGTH_SHORT).show(); | ||
|
|
||
| } | ||
| }); | ||
|
|
||
| } | ||
|
|
||
| @Override | ||
| public void onClick(View view) { | ||
| if (view.getId() == R.id.privacyPolicyLabel) { | ||
| String url = "https://adeekshith.github.io/watomatic/#/privacy-policy.md"; | ||
| Intent i = new Intent(Intent.ACTION_VIEW); | ||
| i.setData(Uri.parse(url)); | ||
| startActivity(i); | ||
| } | ||
|
|
||
| if (view.getId() == R.id.developerLink) { | ||
| String url = "https://twitter.com/adeekshith"; | ||
| Intent i = new Intent(Intent.ACTION_VIEW); | ||
| i.setData(Uri.parse(url)); | ||
| startActivity(i); | ||
| } | ||
| } | ||
| } | ||
36 changes: 0 additions & 36 deletions
36
app/src/main/java/com/parishod/watomatic/activity/about/AboutActivity.kt
This file was deleted.
Oops, something went wrong.
201 changes: 201 additions & 0 deletions
201
app/src/main/java/com/parishod/watomatic/model/githubUesrsResponse/GithubUsersResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
| package com.parishod.watomatic.model.githubUesrsResponse; | ||
|
|
||
|
|
||
|
|
||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
|
|
||
| public class GithubUsersResponse { | ||
|
|
||
| private String login; | ||
| private Integer id; | ||
| private String nodeId; | ||
| private String avatarUrl; | ||
| private String gravatarId; | ||
| private String url; | ||
| private String htmlUrl; | ||
| private String followersUrl; | ||
| private String followingUrl; | ||
| private String gistsUrl; | ||
| private String starredUrl; | ||
|
|
||
| private String subscriptionsUrl; | ||
|
|
||
| private String organizationsUrl; | ||
|
|
||
| private String reposUrl; | ||
|
|
||
| private String eventsUrl; | ||
|
|
||
| private String receivedEventsUrl; | ||
|
|
||
| private String type; | ||
|
|
||
| private Boolean siteAdmin; | ||
|
|
||
| private Integer contributions; | ||
|
|
||
| private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
|
|
||
| public String getLogin() { | ||
| return login; | ||
| } | ||
|
|
||
| public void setLogin(String login) { | ||
| this.login = login; | ||
| } | ||
|
|
||
| public Integer getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public void setId(Integer id) { | ||
| this.id = id; | ||
| } | ||
|
|
||
| public String getNodeId() { | ||
| return nodeId; | ||
| } | ||
|
|
||
| public void setNodeId(String nodeId) { | ||
| this.nodeId = nodeId; | ||
| } | ||
|
|
||
| public String getAvatarUrl() { | ||
| return avatarUrl; | ||
| } | ||
|
|
||
| public void setAvatarUrl(String avatarUrl) { | ||
| this.avatarUrl = avatarUrl; | ||
| } | ||
|
|
||
| public String getGravatarId() { | ||
| return gravatarId; | ||
| } | ||
|
|
||
| public void setGravatarId(String gravatarId) { | ||
| this.gravatarId = gravatarId; | ||
| } | ||
|
|
||
| public String getUrl() { | ||
| return url; | ||
| } | ||
|
|
||
| public void setUrl(String url) { | ||
| this.url = url; | ||
| } | ||
|
|
||
| public String getHtmlUrl() { | ||
| return htmlUrl; | ||
| } | ||
|
|
||
| public void setHtmlUrl(String htmlUrl) { | ||
| this.htmlUrl = htmlUrl; | ||
| } | ||
|
|
||
| public String getFollowersUrl() { | ||
| return followersUrl; | ||
| } | ||
|
|
||
| public void setFollowersUrl(String followersUrl) { | ||
| this.followersUrl = followersUrl; | ||
| } | ||
|
|
||
| public String getFollowingUrl() { | ||
| return followingUrl; | ||
| } | ||
|
|
||
| public void setFollowingUrl(String followingUrl) { | ||
| this.followingUrl = followingUrl; | ||
| } | ||
|
|
||
| public String getGistsUrl() { | ||
| return gistsUrl; | ||
| } | ||
|
|
||
| public void setGistsUrl(String gistsUrl) { | ||
| this.gistsUrl = gistsUrl; | ||
| } | ||
|
|
||
| public String getStarredUrl() { | ||
| return starredUrl; | ||
| } | ||
|
|
||
| public void setStarredUrl(String starredUrl) { | ||
| this.starredUrl = starredUrl; | ||
| } | ||
|
|
||
| public String getSubscriptionsUrl() { | ||
| return subscriptionsUrl; | ||
| } | ||
|
|
||
| public void setSubscriptionsUrl(String subscriptionsUrl) { | ||
| this.subscriptionsUrl = subscriptionsUrl; | ||
| } | ||
|
|
||
| public String getOrganizationsUrl() { | ||
| return organizationsUrl; | ||
| } | ||
|
|
||
| public void setOrganizationsUrl(String organizationsUrl) { | ||
| this.organizationsUrl = organizationsUrl; | ||
| } | ||
|
|
||
| public String getReposUrl() { | ||
| return reposUrl; | ||
| } | ||
|
|
||
| public void setReposUrl(String reposUrl) { | ||
| this.reposUrl = reposUrl; | ||
| } | ||
|
|
||
| public String getEventsUrl() { | ||
| return eventsUrl; | ||
| } | ||
|
|
||
| public void setEventsUrl(String eventsUrl) { | ||
| this.eventsUrl = eventsUrl; | ||
| } | ||
|
|
||
| public String getReceivedEventsUrl() { | ||
| return receivedEventsUrl; | ||
| } | ||
|
|
||
| public void setReceivedEventsUrl(String receivedEventsUrl) { | ||
| this.receivedEventsUrl = receivedEventsUrl; | ||
| } | ||
|
|
||
| public String getType() { | ||
| return type; | ||
| } | ||
|
|
||
| public void setType(String type) { | ||
| this.type = type; | ||
| } | ||
|
|
||
| public Boolean getSiteAdmin() { | ||
| return siteAdmin; | ||
| } | ||
|
|
||
| public void setSiteAdmin(Boolean siteAdmin) { | ||
| this.siteAdmin = siteAdmin; | ||
| } | ||
|
|
||
| public Integer getContributions() { | ||
| return contributions; | ||
| } | ||
|
|
||
| public void setContributions(Integer contributions) { | ||
| this.contributions = contributions; | ||
| } | ||
|
|
||
| public Map<String, Object> getAdditionalProperties() { | ||
| return this.additionalProperties; | ||
| } | ||
|
|
||
| public void setAdditionalProperty(String name, Object value) { | ||
| this.additionalProperties.put(name, value); | ||
| } | ||
|
|
||
| } |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/parishod/watomatic/network/GetGitUserInterface.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.parishod.watomatic.network; | ||
|
|
||
| import com.parishod.watomatic.model.githubUesrsResponse.GithubUsersResponse; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import retrofit2.Call; | ||
| import retrofit2.http.GET; | ||
|
|
||
| public interface GetGitUserInterface { | ||
| @GET("/repos/adeekshith/watomatic/contributors") | ||
| Call<List<GithubUsersResponse>> getContriUsers(); | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.