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 - Adding menu options to webview code -


i have scoured net solution far unsuccessful. can me. newb , don't know java programming. tutorials on web, have created "webview" app loads local html files. works fine. i'm trying add options menu clicking "menu" button on phone can quit(exit) app. there many tutorials out there when try add code java file, existing code in file start coming errors & goes haywire. hoping can add appropriate code existing code below or correct code if wrong menu options included quit app. thank in advance.

su


`package com.xrefguide;

import android.app.activity; import android.os.bundle; import android.webkit.webview; import android.webkit.webviewclient;

public class xrefguide extends activity { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main);

    webview web = (webview) findviewbyid(r.id.webview);     web.getsettings().setjavascriptenabled(true);     web.loadurl("file:///android_asset/index.html");     web.getsettings().setjavascriptcanopenwindowsautomatically(false);     web.getsettings().setpluginsenabled(true);     web.getsettings().setsupportmultiplewindows(false);     web.getsettings().setsupportzoom(true);     web.setverticalscrollbarenabled(false);     web.sethorizontalscrollbarenabled(false);     web.getsettings().setbuiltinzoomcontrols(true);     web.getsettings().setloadwithoverviewmode(true);     web.getsettings().setusewideviewport(true);      //our application's main page loaded     //web.loadurl("http://mapa.org.my");      web.setwebviewclient(new webviewclient() {         @override public boolean shouldoverrideurlloading(webview view, string url) {             return false;         }         });  } 

}`

there nothing in code has whatsoever options menu. here 2 sample projects demonstrating use of options menus , context menus, one using menu xml files, , one defining menus purely in java.


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 -