Casting Your Content to the Big Screen - Google Cast — Google Developers:
Technology, Art, Solution, Tips, Multimedia, How To, What Is, Programming, Software, Freelance
Feb 21, 2014
Feb 20, 2014
How to render a full resolution image with WebView in Android? - Stack Overflow
How to render a full resolution image with WebView in Android? - Stack Overflow:
<meta name='viewport' content='target-densitydpi=device-dpi' />
Android Webview with diff screen densities
WebView | Android Developers:
Building web pages to support different screen densities
The screen density of a device is based on the screen resolution. A screen with low density has fewer available pixels per inch, where a screen with high density has more — sometimes significantly more — pixels per inch. The density of a screen is important because, other things being equal, a UI element (such as a button) whose height and width are defined in terms of screen pixels will appear larger on the lower density screen and smaller on the higher density screen. For simplicity, Android collapses all actual screen densities into three generalized densities: high, medium, and low.
By default, WebView scales a web page so that it is drawn at a size that matches the default appearance on a medium density screen. So, it applies 1.5x scaling on a high density screen (because its pixels are smaller) and 0.75x scaling on a low density screen (because its pixels are bigger). Starting with API level
ECLAIR, WebView supports DOM, CSS, and meta tag features to help you (as a web developer) target screens with different screen densities.Here's a summary of the features you can use to handle different screen densities:
- The
window.devicePixelRatioDOM property. The value of this property specifies the default scaling factor used for the current device. For example, if the value ofwindow.devicePixelRatiois "1.0", then the device is considered a medium density (mdpi) device and default scaling is not applied to the web page; if the value is "1.5", then the device is considered a high density device (hdpi) and the page content is scaled 1.5x; if the value is "0.75", then the device is considered a low density device (ldpi) and the content is scaled 0.75x. - The
-webkit-device-pixel-ratioCSS media query. Use this to specify the screen densities for which this style sheet is to be used. The corresponding value should be either "0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density, or high density screens, respectively. For example:<link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio:1.5)" href="hdpi.css" />
Thehdpi.cssstylesheet is only used for devices with a screen pixel ration of 1.5, which is the high density pixel ratio.
HTML5 Video support
In order to support inline HTML5 video in your application, you need to have hardware acceleration turned on, and set a
WebChromeClient. For full screen support, implementations of onShowCustomView(View, WebChromeClient.CustomViewCallback) and onHideCustomView() are required,getVideoLoadingProgressView() is optional.Feb 19, 2014
android - WebView getting rid of double tap zoom. - Stack Overflow
android - WebView getting rid of double tap zoom. - Stack Overflow:
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getY() >= 0) // Otherwise it's a fake tap we simulated
{
if (dtTime == 0)
{
dtDistance = ViewConfiguration.get(v.getContext()).getScaledDoubleTapSlop(); // Maximum distance between taps for them to be considered double tap
dtDistanceSquared = dtDistance * dtDistance;
dtTime = ViewConfiguration.getDoubleTapTimeout(); // Maximum time elapsed between taps for them to be considered double tap
}
switch (event.getAction())
{
case MotionEvent.ACTION_UP:
lastUp = event.getEventTime();
break;
case MotionEvent.ACTION_DOWN:
long t = event.getEventTime();
if (t - lastUp < dtTime * 4/3) // Very rarely just (t - lastUp <= dtTime) doesn't work
{
int x = getRemoteX(event.getX());
if (inRadius(x, -1, lastDownX, lastDownY))
performTap(v, getRemoteX(lastDownX), -1, t); // Otherwise our fake tap would constitute a double tap with the previous real tap
performTap(v, x, -1, t);
}
lastDownX = event.getX();
lastDownY = event.getY();
break;
}
}
return false;
}
});
Repair syntax highlight for php file from VS.php
No syntax highlighting in VS.Php 3.1 for VS2012 | Jcx.Software Corp.:
Repair syntax highlight for php file from VS.php
Repair syntax highlight for php file from VS.php
Feb 18, 2014
How to access full source of old commit in BitBucket? - Stack Overflow
How to access full source of old commit in BitBucket? - Stack Overflow:
I understand you want to download an older version via the BitBucket web interface without using a Mercurial/Git client.
Check this related question. On the comments, someone says that there is no way to do that. Fortunately, that's not entirely true.
By navigating on BitBucket project pages, I found no link to download an arbitrary version. There are links to download specific tags, in the format:
https://bitbucket.org/owner/repository/get/v0.1.2.tar.gz
But by tweaking a bit the url above, changing the tag name by the commit hash, like:
https://bitbucket.org/owner/repository/get/A0B1C2D.tar.gz
You can actually download a specific version.
Eclipse Community Forums: Newcomers » "Open Project" grayed out !!!
Eclipse Community Forums: Newcomers » "Open Project" grayed out:
"On 4/15/2010 10:00 PM, DHeadrick wrote:
> Any ideas how I can make "Open Projects" active?
"Project"->"Open Project" is only active if you have selected a
(non-open) project in "Project Explorer".
You might have to open the "Project Explorer" first ("Window"->"Show
View"->"Project Explorer").
(Ran into the problem myself yesterday - after reshuffling some
collapsed windows, my "Project Explorer" view was gone.)"
"On 4/15/2010 10:00 PM, DHeadrick wrote:
> Any ideas how I can make "Open Projects" active?
"Project"->"Open Project" is only active if you have selected a
(non-open) project in "Project Explorer".
You might have to open the "Project Explorer" first ("Window"->"Show
View"->"Project Explorer").
(Ran into the problem myself yesterday - after reshuffling some
collapsed windows, my "Project Explorer" view was gone.)"
Feb 17, 2014
Feb 16, 2014
Feb 13, 2014
Feb 11, 2014
very useful Google chrome plug in for web designer
1.page ruler ( measure px )
2. cssviewer ( see the layer of elements )
3. web deverloper ( responsive layout and etc )
4. capture page ( capture whole page as jpg )
5. stylebot ( temp adjust css to see temp result )
6. colorzilla ( pick color )
2. cssviewer ( see the layer of elements )
3. web deverloper ( responsive layout and etc )
4. capture page ( capture whole page as jpg )
5. stylebot ( temp adjust css to see temp result )
6. colorzilla ( pick color )
Jan 30, 2014
Jan 28, 2014
Jan 27, 2014
ASP.Net validation summary causes page to jump to top - Stack Overflow
ASP.Net validation summary causes page to jump to top - Stack Overflow:
Two possible work arounds:
Disable client validation and jump to correct position on post back:
* set EnableClientScript="false" for all validation controls (disabling client validation)
* set MaintainScrollPositionOnPostback="true" in Page directiveDisable the scrollTo function in javascript:
<script type="text/javascript">
window.scrollTo = function() { }
</script>
Subscribe to:
Posts (Atom)