-
Notifications
You must be signed in to change notification settings - Fork 305
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
fix: Enhanced layout of "About" Activity #1139
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,13 @@ | |
import android.content.pm.PackageInfo; | ||
import android.content.pm.PackageManager; | ||
import android.os.Bundle; | ||
import android.text.Html; | ||
import android.text.Spannable; | ||
import android.text.Spanned; | ||
import android.widget.TextView; | ||
|
||
import com.google.android.material.appbar.CollapsingToolbarLayout; | ||
import com.google.android.material.textview.MaterialTextView; | ||
|
||
import org.onebusaway.android.R; | ||
|
||
|
@@ -52,7 +56,14 @@ protected void onCreate(Bundle savedInstanceState) { | |
|
||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); | ||
|
||
TextView tv = (TextView) findViewById(R.id.about_text); | ||
// TextView tv = (TextView) findViewById(R.id.about_text); | ||
MaterialTextView versionText,codeContributorsText,translationsText,imageCreditsText,howToContributeText; | ||
versionText = findViewById(R.id.version_text); | ||
codeContributorsText = findViewById(R.id.code_contributor_text); | ||
translationsText = findViewById(R.id.translations_text); | ||
imageCreditsText = findViewById(R.id.image_credit_text); | ||
howToContributeText = findViewById(R.id.contribute_to_our_app_text); | ||
|
||
String versionString = ""; | ||
int versionCode = 0; | ||
try { | ||
|
@@ -65,16 +76,20 @@ protected void onCreate(Bundle savedInstanceState) { | |
|
||
StringBuilder builder = new StringBuilder(); | ||
// Version info | ||
builder.append("v") | ||
builder.append("Version: ") | ||
.append(versionString) | ||
.append(" (") | ||
.append("(") | ||
.append(versionCode) | ||
.append(")\n\n"); | ||
.append(")"); | ||
|
||
// Majority of content from string resource | ||
builder.append(getString(R.string.about_text)); | ||
builder.append("\n\n"); | ||
|
||
tv.setText(builder.toString()); | ||
// builder.append(getString(R.string.about_text)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, I personally feel we could just remove this |
||
// builder.append("\n\n"); | ||
versionText.setText(builder); | ||
//set Html text to textview | ||
codeContributorsText.setText((Spannable) Html.fromHtml(getString(R.string.code_contributors_content))); | ||
translationsText.setText((Spannable) Html.fromHtml(getString(R.string.translations_content))); | ||
imageCreditsText.setText((Spannable) Html.fromHtml(getString(R.string.image_credits_content))); | ||
howToContributeText.setText((Spannable) Html.fromHtml(getString(R.string.contribute_to_our_app_content))); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -890,7 +890,87 @@ | |
<string name="storage_permissions_message">To backup or restore your data, OneBusAway needs permission to access your local device storage.</string> | ||
|
||
<!-- About --> | ||
<string name="welcome_heading">Welcome to OneBusAway!</string> | ||
<string name="title_activity_about">About</string> | ||
<string name="code_contributors_sub_heading"><b>Code Contributors:</b></string> | ||
<string name="image_credits_sub_heading">Image Credits:</string> | ||
<string name="translations_sub_heading">Translations:</string> | ||
<string name="contribute_to_our_app_sub_heading">Join the Journey: Contribute to Our App!</string> | ||
<string name="app_description">At OneBusAway, we\'re passionate about creating innovative solutions to simplify your transit experience. Our Android app is a labor of love, made possible by the dedication and talent of a diverse group of individuals and organizations. Here\'s a glimpse into the fantastic contributors who have made OneBusAway what it is today:</string> | ||
<string name="code_contributors_content"><![CDATA[ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Umm not sure, but I I feel its not good to store html in this file, as it would be hard to translate the html anyways |
||
<html> | ||
<body> | ||
<p>Our dedicated contributors improve the app\'s functionality and user experience:<br></p> | ||
<ul> | ||
<li><b>Paul Watts</b></li> | ||
<li><b>Brian Ferris</b></li> | ||
<li><b>Daniel Welsh</b></li> | ||
<li><b>Arno Hart</b></li> | ||
<li><b>Sean Barbeau</b></li> | ||
<li><b>York Region Transit</b></li> | ||
<li><b>Ben Du</b></li> | ||
<li><b>Cagri Cetin</b></li> | ||
<li><b>Mike Karabushin</b></li> | ||
<li><b>Aziz Batihk</b></li> | ||
<li><b>Charles Bond</b></li> | ||
<li><b>Hillsborough Area Regional Transit (via Simon Jacobs at Cambridge Systematics)</b></li> | ||
<li><b>Bridgette Eichelberger</b></li> | ||
<li><b>Rodrigo Carvalho (Google Summer of Code 2017)</b></li> | ||
<li><b>Steve Moritani</b></li> | ||
<li><b>Ellen Conley</b></li> | ||
</ul> | ||
</body> | ||
</html> | ||
]]></string> | ||
<string name="translations_content"><![CDATA[ | ||
<html> | ||
<body> | ||
<p> | ||
Thanks to our translators, OneBusAway is | ||
accessible worldwide: | ||
</p> | ||
<ul> | ||
<li><b>Ari Rusakko</b></li> | ||
<li><b>Eleonora Fabbri</b></li> | ||
<li><b>Edgar Andrés Moncada Taborda</b></li> | ||
</ul> | ||
</body> | ||
</html> | ||
]]></string> | ||
<string name="image_credits_content"><![CDATA[ | ||
<html> | ||
<body> | ||
<p> | ||
Thanks to the designers who created images used in the vehicle icons, which were uploaded to the Noun Project under CC BY 3.0 (https://creativecommons.org/licenses/by/3.0/us/): | ||
</p> | ||
<ul> | ||
<li>Arrow by <b>Zlatko Najdenovski</b>, MK</li> | ||
<li>Map Marker by <b>Housin Aziz</b>, SE</li> | ||
<li>Incognito by <b>Christopher Schreiner</b></li> | ||
<li>Flag Triangle by <b>Austin Andrews</b></li> | ||
</ul> | ||
</body> | ||
</html> | ||
]]></string> | ||
<string name="contribute_to_our_app_content"><![CDATA[ | ||
<html> | ||
<body> | ||
<p>Check out our project on GitHub at https://github.com/OneBusAway/onebusaway-android. | ||
</p> | ||
<p> | ||
Find out more about the OneBusAway open-source project at https://onebusaway.org .</p> | ||
<p> | ||
Special thanks to Google for the visually stunning material design icons(https://github.com/google/material-design-icons), | ||
which add a touch of elegance to our app. Their generosity in licensing | ||
these icons under Apache v2.0(https://www.apache.org/licenses/LICENSE-2.0) has greatly enriched our user experience. | ||
</p> | ||
|
||
<p> | ||
Explore our app and embark on a seamless transit journey with OneBusAway! | ||
</p> | ||
</body> | ||
</html> | ||
]]></string> | ||
<string name="about_text"> | ||
"Find out more about the OneBusAway open-source project at https://onebusaway.org.\n\n" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it would be better if we could just remove unused code