diff --git a/app/src/main/java/ai/elimu/vitabu/ui/storybook/ChapterFragment.java b/app/src/main/java/ai/elimu/vitabu/ui/storybook/ChapterFragment.java index 78ed9fa..69a8650 100644 --- a/app/src/main/java/ai/elimu/vitabu/ui/storybook/ChapterFragment.java +++ b/app/src/main/java/ai/elimu/vitabu/ui/storybook/ChapterFragment.java @@ -61,7 +61,7 @@ public class ChapterFragment extends Fragment implements AudioListener { private StoryBookChapterGson storyBookChapter; - protected String[] chapterParagraph = {}; + protected String[] chapterParagraphs = {}; private RecyclerView chapterRecyclerView; @@ -160,7 +160,7 @@ public void onItemClick(WordGson wordWithAudio, View view, int position) { chapterRecyclerView.setAdapter(wordViewAdapter); } - chapterParagraph = new String[storyBookParagraphGsons.size()]; + chapterParagraphs = new String[storyBookParagraphGsons.size()]; for (int paragraphIndex = 0; paragraphIndex < storyBookParagraphGsons.size(); paragraphIndex++) { Log.i(getClass().getName(), "storyBookParagraphGson.getOriginalText(): \"" + storyBookParagraphGsons.get(paragraphIndex).getOriginalText() + "\""); @@ -169,7 +169,7 @@ public void onItemClick(WordGson wordWithAudio, View view, int position) { Log.i(getClass().getName(), "wordsInOriginalText.length: " + wordsInOriginalText.length); Log.i(getClass().getName(), "Arrays.toString(wordsInOriginalText): " + Arrays.toString(wordsInOriginalText)); - chapterParagraph[paragraphIndex] = originalText; + chapterParagraphs[paragraphIndex] = originalText; List wordAudios = storyBookParagraphGsons.get(paragraphIndex).getWords(); Log.i(getClass().getName(), "words: " + wordAudios); @@ -188,7 +188,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat super.onViewCreated(view, savedInstanceState); // Add button for initializing Text-to-Speech (TTS) - final String[] chapterText = chapterParagraph; + final String[] chapterText = chapterParagraphs; FloatingActionButton fab = view.findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/ai/elimu/vitabu/ui/storybook/CoverFragment.java b/app/src/main/java/ai/elimu/vitabu/ui/storybook/CoverFragment.java index a5c3a60..6d179f0 100644 --- a/app/src/main/java/ai/elimu/vitabu/ui/storybook/CoverFragment.java +++ b/app/src/main/java/ai/elimu/vitabu/ui/storybook/CoverFragment.java @@ -54,19 +54,19 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, int[] titleFontSize = getResources().getIntArray(R.array.cover_title_font_size); int[] descriptionFontSize = getResources().getIntArray(R.array.chapter_text_font_size); - for (int i=0; i { - titleTextView.setText(TextUtils.join("", chapterParagraph)); + titleTextView.setText(TextUtils.join("", chapterParagraphs)); descriptionTextView.setText(description[0]); }); - audioText = TextUtils.join("", chapterParagraph); + audioText = TextUtils.join("", chapterParagraphs); audioTextView = titleTextView; } };