treat the assets folder as / (root) for your server, put it all in there...
On Nov 11, 8:43 am, Sunil Mishra <[email protected]> wrote: > As a workaround i tried storing the image in app_images folder in > sdcard and trying to provide the url of that path. But still the > issues exists. Is there any other work around possible?? > > And do you have any clue > > On Nov 11, 5:18 pm, Daniel Drozdzewski <[email protected]> > wrote:> Sunil, > > > You should not have developed your http server, but utilise some OSS > > project that does that. > > Your links to images or any other resource are relative to the context > > of that web page (or web application) running within your web server. > > > wwwroot > > - websiteA > > -images > > -topWrapper-bg.jpg > > - ... > > -css > > -javascript > > - websiteB > > - websiteC > > -index.html > > > To achieve this, your server has to do translation from URL > > 'images/topWrapper-bg.jpg' to a file path within your storage > > '/yourstorage/yourwebserver/wwwroot/webisteA/images/topWrapper-bg.jpg'. > > > Without this, you are dead in the water. > > > Just use ready, mature and testes OSS HTTP server written in Java. > > > Here is one option. Just package it into your application. It is only 4kB: > > >http://www.jibble.org/miniwebserver/ > > > Daniel > > > On 11 November 2011 11:27, Sunil Mishra <[email protected]> wrote: > > > > I tried changing background-image:url('images/css/topBanner.jpg') to > > > background-image:url(file://android_asset/raw/images/css/ > > > topBanner.jpg' ) but it still not working. > > > > On Nov 11, 4:20 pm, Miguel Morales <[email protected]> wrote: > > >> They sure are. > > > >> On Fri, Nov 11, 2011 at 3:14 AM, Sunil Mishra > > >> <[email protected]>wrote: > > > >> > The images are in res->raw->images->css > > > >> > On Nov 11, 3:38 pm, Miguel Morales <[email protected]> wrote: > > >> > > That's better, most likely you'll want to put your html/images in > > >> > > the res > > >> > > folder and then user the following path: > > > >> > > file://android_asset/file_path.png > > > >> > > If you are downloading these files dynamically, then simply change > > >> > > the > > >> > > file:// path. > > > >> > > On Fri, Nov 11, 2011 at 2:30 AM, Sunil Mishra <[email protected] > > >> > >wrote: > > > >> > > > home.html > > > >> > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > >> > > > "http:// > > >> > > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > >> > > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> > > >> > > > <head> > > >> > > > <title>ODMS</title> > > >> > > > <meta http-equiv="Content-Type" content="text/html; > > >> > > > charset=utf-8" /> > > >> > > > <style type = "text/css"> > > >> > > > html { > > >> > > > background: #d2d2d2; > > >> > > > margin:0 0 0 -1px; > > >> > > > padding:0; > > >> > > > overflow-Y: scroll; > > >> > > > } > > > >> > > > body { > > >> > > > padding:0; > > >> > > > margin :0; > > >> > > > display:table; > > >> > > > width:100%; > > >> > > > } > > > >> > > > body { > > >> > > > color:#606060; > > >> > > > font-family: 'Trebuchet MS', sans-serif; > > >> > > > font-size: 13px; > > >> > > > font-style: normal; > > >> > > > font-weight: normal; > > >> > > > text-transform: normal; > > >> > > > } > > > >> > > > p { > > >> > > > letter-spacing: normal; > > >> > > > line-height: 1.7em; > > >> > > > } > > > >> > > > h1 { > > >> > > > color:#505050; > > >> > > > font-size:22px; > > >> > > > margin:25px 0 10px 0; > > >> > > > clear:both; > > >> > > > } > > > >> > > > h2 { > > >> > > > color:#505050; > > >> > > > font-size:20px; > > >> > > > margin:20px 0 10px 0; > > >> > > > clear:both; > > >> > > > } > > > >> > > > h3 { > > >> > > > color:#505050; > > >> > > > font-size:18px; > > >> > > > margin:20px 0 5px 0; > > >> > > > clear:both; > > >> > > > } > > > >> > > > a:link, a:visited { > > >> > > > color:#9B251B; > > >> > > > text-decoration:none; > > >> > > > } > > > >> > > > a:hover { > > >> > > > color:#fa720a; > > >> > > > text-decoration:underline; > > >> > > > } > > > >> > > > #wrapper { > > >> > > > background: transparent url( images/css/page-vbg.jpg ) > > >> > > > repeat-y > > >> > > > scroll 50% 0px; > > >> > > > margin:0 auto ; > > >> > > > width:100%; > > >> > > > } > > > >> > > > body { > > >> > > > background-color:#d2d2d2; > > >> > > > } > > > >> > > > #wrapper { > > >> > > > border-top: 1px solid #ffffff; > > >> > > > } > > > >> > > > #topWrapper { > > >> > > > width:100%; > > >> > > > height:240px; > > >> > > > background-color:${topWrapper.bg.color}; > > >> > > > background-image:url(images/css/topWrapper-bg.jpg); > > >> > > > background-position:center top ; > > >> > > > background-repeat:repeat-x; > > >> > > > } > > > >> > > > #topBanner { > > >> > > > width:960px; > > >> > > > margin:0 auto; > > >> > > > height:240px; > > >> > > > background-image:url('images/css/topBanner.jpg'); > > >> > > > background-repeat:no-repeat; > > >> > > > } > > > >> > > > #topnav { > > >> > > > background:transparent url('images/css/hmenu.jpg') repeat-x > > >> > > > top > > >> > > > left; > > >> > > > } > > > >> > > > #topnav { > > >> > > > height:40px; > > >> > > > margin:0 auto ; > > >> > > > text-align:center; > > >> > > > } > > > >> > > > #topnav ul { > > >> > > > display:table; > > >> > > > margin:0 auto; > > >> > > > padding:0; > > >> > > > list-style-type:none; > > >> > > > position:relative; > > >> > > > height:40px; > > >> > > > text-transform:uppercase; > > >> > > > font-size:12px; > > >> > > > font-family:Arial,sans-serif; > > >> > > > } > > > >> > > > #topnav ul li { > > >> > > > display:block; > > >> > > > float:left; > > >> > > > margin:0; > > >> > > > padding:0; > > >> > > > background:transparent url('images/css/hmenu.jpg') repeat-x > > >> > > > top > > >> > > > left; > > > >> > > > } > > > >> > > > #topnav ul li a { > > >> > > > display:block; > > >> > > > float:left; > > >> > > > color:#eeb7b7; > > >> > > > text-decoration:none; > > >> > > > padding:0px 50px ; > > >> > > > line-height:40px; > > >> > > > font-weight:bold; > > >> > > > } > > > >> > > > #topnav ul li a:hover, #topnav li#current a { > > >> > > > color:#FFFFFF; > > >> > > > background:transparent url('images/css/hmenu-sel.jpg') > > >> > > > repeat-x > > >> > top > > >> > > > left; > > >> > > > } > > > >> > > > #topnav ul { > > >> > > > width:960px; > > >> > > > } > > > >> > > > body { > > >> > > > background-position : center 280px; > > >> > > > } > > > >> > > > #bg { > > >> > > > margin:0 auto; > > >> > > > padding:0; > > >> > > > background:transparent ; > > >> > > > background-image:url(images/css/hat.jpg); > > >> > > > background-repeat:no-repeat; > > >> > > > background-position: center top ; > > >> > > > } > > > >> > > > #header { > > >> > > > margin: 0 auto; > > >> > > > min-height:30px; > > >> > > > height: 30px; > > >> > > > width: 960px; > > >> > > > } > > > >> > > > #page { > > >> > > > background: transparent url( images/css/page-bg.jpg ) > > >> > > > no-repeat > > >> > > > center top; > > >> > > > } > > > >> > > > #container { > > >> > > > margin:0 auto; > > >> > > > width:960px; > > >> > > > } > > > >> > > > #content { > > >> > > > width:940px; > > >> > > > margin:0 auto ; > > >> > > > text-align:left; > > >> > > > min-height:400px; > > >> > > > } > > > >> > > > #content p { > > >> > > > text-align:justify; > > >> > > > } > > > >> > > > #footerWrapper { > > >> > > > margin:0 auto; > > >> > > > height:180px; > > >> > > > padding:0; > > >> > > > background:transparent url( images/css/footerWrapper-bg.jpg > > >> > > > ) > > >> > no- > > >> > > > repeat scroll center top; > > >> > > > } > > > >> > > > #footer { > > >> > > > margin:0 auto; > > >> > > > padding:0; > > >> > > > width:960px; > > >> > > > height:100px; > > >> > > > } > > > >> > > > #footer { > > >> > > > color:#CCCCCC; > > >> > > > text-align:center; > > >> > > > } > > > >> > > > #footer a:link, #footer a:visited { > > >> > > > color:#EEEEEE; > > >> > > > } > > > >> > > > #footer a:hover{ > > >> > > > color:#FFFFFF; > > >> > > > text-decoration:none; > > >> > > > } > > > >> > > > #right { > > >> > > > width:200px; > > >> > > > padding:10px 20px 20px 20px; > > >> > > > float:left; > > >> > > > } > > > >> > > > #center { > > >> > > > width:660px; > > >> > > > padding:10px 20px 20px 20px; > > >> > > > float:left; > > >> > > > } > > > >> > > > #content p { > > >> > > > margin-top:10px; > > >> > > > text-align:justify; > > >> > > > } > > > >> > > > #sidebar ul.vmenu { > > >> > > > list-style: none; > > >> > > > text-align: left; > > >> > > > margin: 7px 0px 8px 0px; > > >> > > > padding: 0; > > >> > > > text-decoration: none; > > >> > > > border-top: 1px solid #eeeeee; > > >> > > > } > > > >> > > > #sidebar ul.vmenu li { > > >> > > > list-style: none; > > >> > > > padding: 4px 0 4px 0px; > > >> > > > margin: 0 2px; > > >> > > > border-bottom: 1px solid #eeeeee; > > >> > > > } > > > >> > > > #sidebar ul.vmenu li a { > > >> > > > text-decoration: none; > > >> > > > color:#9B251B; > > >> > > > } > > > >> > > > #sidebar ul.vmenu li a:hover { > > >> > > > color:#d8d8f0; > > >> > > > } > > > >> > > > #sidebar ul.vmenu ul { margin: 0 0 0 5px; padding: 0; } > > >> > > > #sidebar ul.vmenu ul li { border: none; } > > > >> > > > a img { > > >> > > > border:none; > > >> > > > } > > > >> > > > .clear { > > >> > > > clear: both; > > >> > > > display: block; > > >> > > > overflow: hidden; > > >> > > > visibility: hidden; > > >> > > > width: 0; > > >> > > > height: 0; > > >> > > > } > > > >> > > > </style> > > > >> > > > </head> > > >> > > > <body> > > >> > > > <!-- top wrapper --> > > >> > > > <div id="topWrapper"> > > >> > > > <div id="topBanner"></div> > > >> > > > </div> > > >> > > > <div id="topnav"> > > >> > > > <ul> > > >> > > > <li id="current" style="border:none"> > > >> > > > <a href="" shape="rect">Home</a> > > >> > > > </li> > > > ... > > > read more » -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

