mathjax - Android MathView Overflows Width of the Parent View -
i using https://github.com/kexanie/mathview , texcode tutorial show mathematics equations in mathview. when open activity, mathview loads after few time. exceeds parent view width when i've set mathview match parent width. tried put mathview inside horizontalscrollview, takes forever load mathview. need solution load mathview inside parent linearlayout.
dependency
compile 'io.github.kexanie.library:mathview:0.0.6'
activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="10dp" > <scrollview android:layout_width="match_parent" android:layout_height="wrap_content"> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:auto="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".mainactivity" android:orientation="vertical"> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="sum of n terms of a.p." /> <io.github.kexanie.library.mathview android:id="@+id/formula_two" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$${n\\over2}[2a+(n-1)d]$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <io.github.kexanie.library.mathview android:id="@+id/formula_three" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="or, $${n\\over2}[firstterm+lastterm]$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="other important results" /> <io.github.kexanie.library.mathview android:id="@+id/formula_four" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$$(1+2+3+..+n)={n(n+1) \\over 2}$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <io.github.kexanie.library.mathview android:id="@+id/formula_four2" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$$(1^2+2^2+3^2+..+n^2)= {n(n+1)(2n+1) \\over 6}$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <io.github.kexanie.library.mathview android:id="@+id/formula_four3" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$$(1^3+2^3+3^3+..+n^3)={n^2(n+1)^2 \\over 4} $$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="2. geometrical progression (g.p.):" android:textcolor="#2c3e50" /> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="example:" /> <io.github.kexanie.library.mathview android:id="@+id/formula_five" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$$a,ar,ar^2,ar^3,...$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="in geometrical progression(g.p.) nth term " /> <io.github.kexanie.library.mathview android:id="@+id/formula_six" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$$ar^{n−1}$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="in geometrical progression(g.p.) sum of n terms " /> <io.github.kexanie.library.mathview android:id="@+id/formula_seven" android:layout_width="match_parent" android:layout_height="wrap_content" auto:text="$${a(1−r^n) \\over 1−r}$$" auto:engine="mathjax" > </io.github.kexanie.library.mathview> </linearlayout> </scrollview> </linearlayout>
snapshots
Comments
Post a Comment