-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* localization updates cs01-cs05: all languages with general updates for bg/fr/it (#230) * localization update v01-v04: all languages. fr, it, ro have larger general updates. * faq content * adds changeset v05 peanuts * fix markdown hyperlink syntax: es, pt-rBR, ru. add es hyperlink. * Add Frequently Asked Questions menu item * Replace large if with switch * Add FaqActivity * NF.org /book/ url update (#231) * Add link to How Not to Diet in AboutActivity * Add Markwon library to support Markdown links inside TextViews * Update versionCode and versionName --------- Co-authored-by: --marc <marc-medley@users.noreply.github.com>
- Loading branch information
1 parent
07a2678
commit 25d8275
Showing
25 changed files
with
1,356 additions
and
716 deletions.
There are no files selected for viewing
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
29 changes: 29 additions & 0 deletions
29
app/src/main/java/org/nutritionfacts/dailydozen/activity/FaqActivity.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,29 @@ | ||
package org.nutritionfacts.dailydozen.activity; | ||
|
||
import android.os.Bundle; | ||
|
||
import androidx.annotation.Nullable; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import org.nutritionfacts.dailydozen.R; | ||
import org.nutritionfacts.dailydozen.databinding.ActivityFaqBinding; | ||
|
||
import io.noties.markwon.Markwon; | ||
|
||
public class FaqActivity extends AppCompatActivity { | ||
private ActivityFaqBinding binding; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
binding = ActivityFaqBinding.inflate(getLayoutInflater()); | ||
setContentView(binding.getRoot()); | ||
init(); | ||
} | ||
|
||
private void init() { | ||
final Markwon markwon = Markwon.create(this); | ||
markwon.setMarkdown(binding.faqScalingResponse, getString(R.string.faq_scaling_response)); | ||
markwon.setMarkdown(binding.faqSupplementsResponse, getString(R.string.faq_supplements_response)); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,211 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_adapt_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_adapt_response" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_age_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_age_response.0" | ||
style="@style/SecondaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_age_response.1" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_calories_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_calories_response.0" | ||
style="@style/SecondaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_calories_response.1" | ||
style="@style/SecondaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_calories_response.2" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_mother_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:text="@string/faq_mother_response" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_scaling_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:id="@+id/faq_scaling_response" | ||
android:text="@string/faq_scaling_response" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
<androidx.cardview.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
app:cardElevation="6dp"> | ||
|
||
<LinearLayout | ||
style="@style/Widget.CardContent" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:text="@string/faq_supplements_question" | ||
style="@style/PrimaryText" | ||
android:layout_marginBottom="20dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
<TextView | ||
android:id="@+id/faq_supplements_response" | ||
android:text="@string/faq_supplements_response" | ||
style="@style/SecondaryText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"/> | ||
|
||
</LinearLayout> | ||
|
||
</androidx.cardview.widget.CardView> | ||
|
||
</LinearLayout> | ||
|
||
</ScrollView> |
Oops, something went wrong.