Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b79dc15
commit d31ac63
Showing
13 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
app/src/main/java/com/supercilex/robotscouter/ui/teamlist/LicensesDialogFragment.java
This file contains 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,59 @@ | ||
package com.supercilex.robotscouter.ui.teamlist; | ||
|
||
import android.app.Dialog; | ||
import android.content.DialogInterface; | ||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.v4.app.DialogFragment; | ||
import android.support.v7.app.AlertDialog; | ||
import android.support.v7.widget.LinearLayoutManager; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.View; | ||
|
||
import com.supercilex.robotscouter.R; | ||
|
||
import net.yslibrary.licenseadapter.LicenseAdapter; | ||
import net.yslibrary.licenseadapter.LicenseEntry; | ||
import net.yslibrary.licenseadapter.Licenses; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class LicensesDialogFragment extends DialogFragment { | ||
@NonNull | ||
@Override | ||
public Dialog onCreateDialog(Bundle savedInstanceState) { | ||
View rootView = getActivity().getLayoutInflater().inflate(R.layout.recycler_view, null); | ||
|
||
List<LicenseEntry> licenses = new ArrayList<>(); | ||
|
||
licenses.add(Licenses.noContent("Firebase", | ||
"Google Inc.", | ||
"https://firebase.google.com/terms/")); | ||
licenses.add(Licenses.fromGitHub("firebase/FirebaseUI-Android", | ||
Licenses.LICENSE_APACHE_V2)); | ||
licenses.add(Licenses.fromGitHub("firebase/firebase-jobdispatcher-android", | ||
Licenses.LICENSE_APACHE_V2)); | ||
licenses.add(Licenses.fromGitHub("square/retrofit", Licenses.LICENSE_APACHE_V2)); | ||
licenses.add(Licenses.fromGitHub("bumptech/glide", "LICENSE")); | ||
licenses.add(Licenses.fromGitHub("hdodenhof/CircleImageView", Licenses.LICENSE_APACHE_V2)); | ||
licenses.add(Licenses.fromGitHub("Triple-T/gradle-play-publisher", Licenses.NAME_MIT)); | ||
licenses.add(Licenses.fromGitHub("square/leakcanary", Licenses.LICENSE_APACHE_V2)); | ||
licenses.add(Licenses.fromGitHub("yshrsmz/LicenseAdapter", Licenses.LICENSE_APACHE_V2)); | ||
|
||
RecyclerView list = (RecyclerView) rootView.findViewById(R.id.list); | ||
list.setLayoutManager(new LinearLayoutManager(getContext())); | ||
list.setAdapter(new LicenseAdapter(licenses)); | ||
|
||
Licenses.load(licenses); | ||
|
||
return new AlertDialog.Builder(getActivity()).setView(rootView) | ||
.setTitle(getString(R.string.licenses)) | ||
.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() { | ||
@Override | ||
public void onClick(DialogInterface dialog, int id) { | ||
} | ||
}) | ||
.create(); | ||
} | ||
} |
This file contains 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 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 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
File renamed without changes.
This file contains 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 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 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 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
## suppress inspection "UnusedProperty" for whole file | ||
#Fri Nov 11 00:28:13 PST 2016 | ||
#suppress inspection "UnusedProperty" for whole file | ||
#Fri Nov 11 13:23:13 PST 2016 | ||
org.gradle.jvmargs=-Xmx2048m | ||
VERSION_CODE=1961 | ||
VERSION_CODE=1967 | ||
android.enableBuildCache=true |
Binary file not shown.
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Sat Aug 06 22:28:38 PDT 2016 | ||
#Fri Nov 11 13:10:41 PST 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-3.3-20161111141334+0000-all.zip |
This file contains 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 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