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.

layout - How to make a resolution independent camera preview on android? -


i'm making android 1.6 app uses phone's camera.

in order app resolution independent, need set compatible aspect ratio previewing camera on surfacelayout. in 1.6 sdk there no way supported sizes camera preview. possible use 4:3 or 3:2 aspect ratio , no errors whith that?

on other hand, need way make xml layout represents surfacelayout in (unknown) aspect ratio in every resolution. assume not possible change surfacelayout size in runtime. can "dp" units? other way making layout programmatically?

there apps vignette or android camera application tricks make that, black bars (vignette) or fixed buttons bar, don't know how in kind of resolution.

any ideas?

thanks!

in 1.6 sdk there no way supported sizes camera preview.

there is. can them in parsing preview-size-values camera parameter.

string supportedsizesstring = parameters.get("preview-size-values"); list<size> supportedsizes = new arraylist<size>(); if (supportedsizesstring != null && supportedsizesstring.length() > 0) {     stringsplitter ss = new textutils.simplestringsplitter(',');     ss.setstring(supportedsizesstring);     (string supportedsize : ss) {         string[] dimentions = supportedsize.split("x");         if (dimentions.length > 1) {             size size = mcamera.new size(integer.parseint(dimentions[0]),             integer.parseint(dimentions[1]));             supportedsizes.add(size);         }     } } 

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 -