-
Notifications
You must be signed in to change notification settings - Fork 4
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
3a8866a
commit a559780
Showing
61 changed files
with
418 additions
and
955 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
58 changes: 58 additions & 0 deletions
58
...tebook/src/main/java/com/plnyyanks/frcnotebook/activities/OpenSourceLicensesActivity.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,58 @@ | ||
package com.plnyyanks.frcnotebook.activities; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.text.Html; | ||
import android.view.MenuItem; | ||
import android.widget.TextView; | ||
|
||
import com.plnyyanks.frcnotebook.R; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.InputStreamReader; | ||
|
||
/** | ||
* Created by phil on 1/31/15. | ||
* Copyright 2015, Phil Lopreiato | ||
* This file is part of FRC Notebook | ||
* FRC Notebook is licensed under the MIT License | ||
* (http://opensource.org/licenses/MIT)* | ||
*/ | ||
public class OpenSourceLicensesActivity extends Activity { | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_open_source_licenses); | ||
TextView text = (TextView) findViewById(R.id.text); | ||
try { | ||
BufferedReader br = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.licenses))); | ||
try { | ||
StringBuilder sb = new StringBuilder(); | ||
String line = br.readLine(); | ||
|
||
while (line != null) { | ||
sb.append(line); | ||
sb.append(System.getProperty("line.separator")); | ||
line = br.readLine(); | ||
} | ||
String everything = sb.toString(); | ||
text.setText(Html.fromHtml(everything)); | ||
} finally { | ||
br.close(); | ||
} | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
text.setText("Error reading licenses file."); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
int id = item.getItemId(); | ||
if (id == android.R.id.home) { | ||
this.finish(); | ||
return true; | ||
} | ||
return super.onOptionsItemSelected(item); | ||
} | ||
} |
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
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
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
Oops, something went wrong.