mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-22 07:58:20 -05:00
Slight edits
Scrolling is nice and quick Animations aren't great, but what I'm trying to do might actually be possible... I can actually remove the JS code.
This commit is contained in:
parent
4e7393653b
commit
54b0290ef2
@ -22,8 +22,10 @@ import javax.inject.Named;
|
|||||||
|
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.InjectView;
|
import butterknife.InjectView;
|
||||||
|
import rx.Observable;
|
||||||
import rx.android.schedulers.AndroidSchedulers;
|
import rx.android.schedulers.AndroidSchedulers;
|
||||||
import rx.functions.Action1;
|
import rx.functions.Action1;
|
||||||
|
import rx.schedulers.Schedulers;
|
||||||
import rx.subjects.PublishSubject;
|
import rx.subjects.PublishSubject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,7 +100,8 @@ public class BookFragment extends BaseFragment {
|
|||||||
Log.d("BookFragment", b.getName());
|
Log.d("BookFragment", b.getName());
|
||||||
((BibleViewer)getActivity()).setActionBarTitle(b.getInitials());
|
((BibleViewer)getActivity()).setActionBarTitle(b.getInitials());
|
||||||
|
|
||||||
bookContent.setLayoutManager(new LinearLayoutManager(getActivity()));
|
final RecyclerView.LayoutManager manager = new LinearLayoutManager(getActivity());
|
||||||
|
bookContent.setLayoutManager(manager);
|
||||||
bookContent.setAdapter(new BookAdapter(b));
|
bookContent.setAdapter(new BookAdapter(b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import android.view.LayoutInflater
|
|||||||
import org.bspeice.minimalbible.R
|
import org.bspeice.minimalbible.R
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import org.bspeice.minimalbible.service.format.osisparser.OsisParser
|
import org.bspeice.minimalbible.service.format.osisparser.OsisParser
|
||||||
|
import org.crosswire.jsword.book.getVersification
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapter used for displaying a book
|
* Adapter used for displaying a book
|
||||||
@ -41,7 +42,8 @@ class BookAdapter(val b: Book) : RecyclerView.Adapter<PassageView>() {
|
|||||||
/**
|
/**
|
||||||
* Get the number of chapters in the book
|
* Get the number of chapters in the book
|
||||||
*/
|
*/
|
||||||
override fun getItemCount(): Int = 800
|
override fun getItemCount(): Int = b.getVersification()
|
||||||
|
.getAllVerses().getEnd().getOrdinal()
|
||||||
}
|
}
|
||||||
|
|
||||||
class PassageView(val _v: View) : RecyclerView.ViewHolder(_v) {
|
class PassageView(val _v: View) : RecyclerView.ViewHolder(_v) {
|
||||||
|
Loading…
Reference in New Issue
Block a user