mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-11-16 04:58:26 -05:00
Initial switch to WebView
This commit is contained in:
parent
348a6da9a3
commit
8c71d4372e
@ -6,7 +6,7 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import org.bspeice.minimalbible.MinimalBible;
|
||||
import org.bspeice.minimalbible.R;
|
||||
@ -28,8 +28,8 @@ public class BookFragment extends BaseFragment {
|
||||
|
||||
@Inject BookManager bookManager;
|
||||
|
||||
@InjectView(R.id.section_label)
|
||||
TextView sectionLabel;
|
||||
@InjectView(R.id.book_content)
|
||||
WebView mainContent;
|
||||
|
||||
private static final String ARG_BOOK_NAME = "book_name";
|
||||
|
||||
@ -99,6 +99,6 @@ public class BookFragment extends BaseFragment {
|
||||
private void displayBook(Book b) {
|
||||
Log.d("BookFragment", b.getName());
|
||||
((BibleViewer)getActivity()).setActionBarTitle(b.getInitials());
|
||||
sectionLabel.setText(b.getName());
|
||||
mainContent.loadData("<p><strong>" + b.getName() + "</strong></p>", "text/html", "utf-8");
|
||||
}
|
||||
}
|
||||
|
@ -2,15 +2,11 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="org.bspeice.minimalbible.MainActivity$PlaceholderFragment" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<WebView
|
||||
android:id="@+id/book_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"></WebView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user