Custom shaped textview, Android -


i'm looking way of making custom shaped text input control on android, showed on screenshot.

what need have predefined places(gray rects) not covered text. when user typing - text lays out offsets left side, or right side, depending on place of gray rect.

it easy on ios, couple lines of code , all. can not find way of doing on android. note gray rects may not part of text input component. on ios put 2 uiimageview on uitextview, , set rects excluding rendering text:

cgfloat margin = 8; cgrect firstpathrect = cgrectmake(0, 80, 160 + margin, 90 + margin); cgrect secondpathrect = cgrectmake([uiscreen mainscreen].bounds.size.width - 160 - 2 * margin, 280, 160, 90 + margin); uibezierpath *path1 = [uibezierpath bezierpathwithrect:firstpathrect]; uibezierpath *path2 = [uibezierpath bezierpathwithrect:secondpathrect]; self.textview.textcontainer.exclusionpaths = @[path1, path2]; 

i hope can me task. in advance!

screenshot ios

check out library flowing text: https://github.com/deano2390/flowtextview


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -