Skip to content

Commit

Permalink
Tweak HTMLification of About content (#1160)
Browse files Browse the repository at this point in the history
* Remove an unused import
* Spacing fixes in code and user-facing content
* Remove `layout_margin` from the TextView that renders the HTML content so that it lines up with the version string.
* Shorten the first paragraph of the about content.
  • Loading branch information
aaronbrethorst authored Mar 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent bb736a5 commit 5f4dc8c
Showing 7 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
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;
@@ -57,7 +56,7 @@ protected void onCreate(Bundle savedInstanceState) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

TextView tv = (TextView) findViewById(R.id.about_text);
MaterialTextView version= findViewById(R.id.version);
MaterialTextView version = findViewById(R.id.version);
String versionString = "";
int versionCode = 0;
try {
@@ -70,13 +69,13 @@ protected void onCreate(Bundle savedInstanceState) {

StringBuilder builder = new StringBuilder();
// Version info
builder.append("Version:")
builder.append("Version: ")
.append(versionString)
.append(" (")
.append(versionCode)
.append(")\n");

// Majority of content from string resource
// Majority of content comes from a string resource:
version.setText(builder.toString());
tv.setText((Spannable) Html.fromHtml(getString(R.string.about_content)));
}
1 change: 0 additions & 1 deletion onebusaway-android/src/main/res/layout/content_about.xml
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
android:id="@+id/about_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:autoLink="web"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
2 changes: 1 addition & 1 deletion onebusaway-android/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -789,7 +789,7 @@
<h1 style="color: #4caf50"><b>¡Bienvenido a OneBusAway!</b></h1>
<p>
En OneBusAway, estamos apasionados por crear soluciones innovadoras para simplificar tu experiencia de transporte. Nuestra aplicación para Android es un trabajo de amor, posible gracias al compromiso y talento de un grupo diverso de individuos y organizaciones. Aquí tienes un vistazo a los fantásticos colaboradores que han hecho de OneBusAway lo que es hoy:
Esta aplicación ha sido creada por un equipo de voluntarios y depende de la dedicación, pasión y talentos de sus colaboradores de código abierto.
</p>
<h2><b>Colaboradores de Código:</b></h2>
<p>
2 changes: 1 addition & 1 deletion onebusaway-android/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
@@ -597,7 +597,7 @@
<h1 style="color: #4caf50"><b>Tervetuloa OneBusAway-hankkeeseen!</b></h1>
<p>
OneBusAwayssa olemme intohimoisia luomaan innovatiivisia ratkaisuja, jotka yksinkertaistavat joukkoliikennekokemustasi. Android-sovelluksemme on rakkaudentyö, joka on mahdollista monien erilaisten yksilöiden ja organisaatioiden omistautumisen ja lahjakkuuden ansiosta. Tässä pieni kurkistus mahtaviin henkilöihin ja organisaatioihin, jotka ovat tehneet OneBusAwaysta sen, millainen se on tänään:
Tämä sovellus on vapaaehtoistiimin tekemä ja se nojaa sen avoimen lähdekoodin avustajien omistautumiseen, intohimoon ja kykyihin.
</p>
<h2><b>Koodinkehittäjät:</b></h2>
<p>
2 changes: 1 addition & 1 deletion onebusaway-android/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
@@ -670,7 +670,7 @@
<h1 style="color: #4caf50"><b>Benvenuti in OneBusAway!</b></h1>
<p>
In OneBusAway siamo appassionati nel creare soluzioni innovative per semplificare la tua esperienza di trasporto. La nostra app per Android è un lavoro d\'amore, reso possibile dall\'impegno e dal talento di un gruppo variegato di individui e organizzazioni. Ecco uno sguardo ai fantastici contributori che hanno reso OneBusAway quello che è oggi:
Questa app è stata realizzata da un team di volontari e si basa sulla dedizione, passione e talenti dei suoi contributori open source.
</p>
<h2><b>Contributori al Codice:</b></h2>
<p>
2 changes: 1 addition & 1 deletion onebusaway-android/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
@@ -619,7 +619,7 @@
<h1 style="color: #4caf50"><b>Witaj w OneBusAway!</b></h1>
<p>
W OneBusAway pasjonujemy się tworzeniem innowacyjnych rozwiązań, które upraszczają Twoje doświadczenia z transportem publicznym. Nasza aplikacja na platformę Android to dzieło miłości, możliwe dzięki zaangażowaniu i talentowi różnorodnej grupy osób i organizacji. Oto przegląd fantastycznych współpracowników, którzy uczynili OneBusAway tym, czym jest dzisiaj:
Ta aplikacja została stworzona przez zespół wolontariuszy i opiera się na poświęceniu, pasji oraz talentach jej współtwórców open source.
</p>
<h2><b>Współtwórcy Kodu:</b></h2>
<p>
7 changes: 2 additions & 5 deletions onebusaway-android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -898,11 +898,8 @@
<h1 style="color: #4caf50"><b>Welcome to OneBusAway!</b></h1>
<p>
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:
OneBusAway is made by a team of volunteers and relies upon
the dedication, passion, and talents of its open source contributors.
</p>
<h2><b>Code Contributors:</b></h2>
<p>

0 comments on commit 5f4dc8c

Please sign in to comment.