Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

android - Scrollbars in TextView -


i didn't want use scrollview. have textview enabled vertical scrollbars.

<textview     android:id="@+id/tv_service_ticketinfo_details"     android:layout_width="fill_parent"     android:layout_height="150dp"                android:textcolor="@color/black"     android:autolink="web"     android:scrollbars="vertical"     android:text="empty"     android:background="@drawable/custom_shape_grey"> </textview> 

the problem is, scrollbars scrollable texts, contain web-links. other texts see scrollbar, can't scroll.

i can't explain it. , you?

upd:

another strange thing: once set text links, can replace 1 without links , textview stays scrollable

so think problem textviews don't automatically scroll, because set android:scrollbars. have set scrollingmovementmethod.

however, when use autolink , links found, android framework set movementmethod you. that's why behaviour's different.

there 2 solutions work me.

after set our text, force movement method 1 supports links , scrolling.

final textview output = (textview) findviewbyid(r.id.output); output.settext(content); // ensure text scroll or without linked text output.setmovementmethod(linkmovementmethod.getinstance()); 

or set movement method, assuming plaintext, before adding text textview. if autolink detects links, change movement method itself.

final textview output = (textview) findviewbyid(r.id.t_output); // ensure text defaults scrollable output.setmovementmethod(scrollingmovementmethod.getinstance()); output.settext(content); 

(fyi: i'm using android:autolink="all")


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -