Skip to content

FridayLi/MagnifyingLayout

Repository files navigation

MagnifyingLayout

a custom layout with a magnifying class to zoom in content, highlight the touched word in text view.

#ScreenShot

#Usage Include MagnifyingLayout in your layout XML.

<com.datayes.magnifying.MagnifyingLayout
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!--add you content view-->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <com.datayes.magnifying.TextSelectionView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            />
    </ScrollView>
</com.datayes.magnifying.MagnifyingLayout>

In the onCreate of your activity or the onCreateView of your fragment, configue the MagnifyingLayout(magnify glass width, magnify glass height glass border color, etc.)

MagnifyingLayout container = (MagnifyingLayout)findViewById(R.id.container);
MagnifyingLayoutConfiguration config = new MagnifyingLayoutConfiguration.Builder()
        .setGlassWidth(500)
        .setGlassHeight(250)
        .setGlassBorderWidth(15)
        .setScale(1.3f)
        .build();
container.initConfiguration(config);

About

a custom layout with a magnifying class to zoom in content, highlight the touched word in text view.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages