Halloween Costume ideas 2015

Digital archives contain as usually understood by professional archivists and historians.

Latest Post
2009 accessibility Aconcagua Administration Adventure Racing Adventure Travel Adventurists Advice Afghanistan Africa Alaska Alberto Contador Aleutian Islands Alex Honnold Alps Amazon Amherst Amherst Destinations Amherst Hikes Andes Android 1.5 Android 1.6 Android 2.0 Android 2.1 Android 2.2 Android 2.3 Android 2.3.3 Android 3.0 Android 3.2 Android 4.0 Android Design Android Developer Challenge Android Developer Phone Android Market Animals Animation and Graphics Annapurna Announcements Antarctic App Components App Resources Apps Archeology Arctic Arctic Ocean Argentina Art Asia Atacama Desert Atlantic Ocean August Australia Authentication Autumn Aviation Backpacking Backyard Nature Badwater Ultra Baffin Island Baltic Sea BASE Jumping Beach Belchertown Belchertown Destinations Belchertown Hikes Berkshires Best Practices Bhutan Blogging Tips Blogs Book Review Boots Boston Botswana Brazil Broad Peak California Camping Canada Canyoneering Carstensz Pyramid Catatan Puspitasari Central America Central Massachusetts Checkpoint Tracker Children Chile China Cho Oyu Cinta Wanita Circumnavigation Clay Climate Change Climbing Clothing Code Day Colorado Colrain Congo River Connecticut Connectivity Conservation Area Contests Cool Stuff Craft Cycling Dashboard Dave Cornthwaite Death Valley Debugging Denali Developer Console Developer Days Developer Labs Developer profiles Dhaulagiri Dinosaurs Discovery Channel Dolomites Earth Day Easter Island Easthampton Ed Viesturs Educational Eiger El Capitan Endurance Sports Environmental Erving Europe Events Everest Expedition Exploration Explorers Club Fair Fairy House Farm Film Festival Finland Fireworks Fish Hatchery Fitz Roy Food Fourth of July France Free Games Gasherbrum Gaya Hidup Wanita Gear General Adventure Gestures Giro d'Italia Gobi Desert Google I/O Google Play Google Play services Goshen GPS Granby Grand Canyon Greater Boston Greenland Grossology Exhibit Guidelines Hadley Hadley 350th Half Dome Hang Gliding Hawaii Health Hikes Under One Mile Hiking Himalaya History Holyoke Honduras Horse How-to Hubungan Hunting Ice Cream IME impossible2Possible Independence Day India Indoor info Info Seminar Input methods Intents Internet Interview io2010 Italy Japan JNI John Muir Trail Jordan July June Jungfrau K2 K7 Kalahari Kangchenjunga Karakoram Kayaking Kilimanjaro Lake Michigan Lance Armstrong Layout Leadville 100 Leverett Lhotse Libraries Lintas Peristiwa Location Location and Sensors London Long Riders Ludlow Maine Makalu Manaslu Maple Massachusetts Matterhorn Media and Camera Mendon Meru Peak Mexico Mini Golf Mississippi River Missouri River Mongolia Monson Mont Blanc Motivasi Mount Elbrus Mount Everest Mount Rainier Mountain Biking Mountain View Mountaineering Movies Mt. Shasta Munich Museums Music Nameless Tower Namibia Nanga Parbat NASA National Geographic Nature Navigation NDK Nepal New Hampshire New Zealand Newburyport North America North Pole Northampton Northfield Norway Novelet Nuptse Nusantara Nutrition Ocean Okavango Delta Olympics Open source OpenGL ES Optimization Oregon Orizaba Outdoor Outdoor Retailer Outside Magazine Pacific Ocean Packs Paddling Pakistan Palmer Panduan SEO Parade Paragliding Patagonia Pelham Peru Petting Zoo Photography Playground Plum Island Poland Pool Pottery Pumpkins Quabbin Reservoir Quality Quick Search Box Rafting Rahasia Wanita Ray Zahab Reggio Emilia Research Resources Review Road Rally Rowing Roz Savage Running Sailing Sample code Sandbox School Science Scuba Diving SDK updates Sensors September Seven Summits Shelburne Falls Shisha Pangma Shutesbury Silk Road Site News Skateboarding skiing Skydiving Slacklining Sleeping Bags Snowboarding Solstice South Africa South America South Deerfield South Georgia South Hadley South Natick South Pacific South Pole Southern Ocean Space Speech Input Springfield Stand Up Paddling Storytime Strawberries Sturbridge Summer Summer Camp Summit Sunderland Survival Sutton Swimming Switzerland Tanzania Technology Tel Aviv Tents Testing Teva Mountain Games Text and Input Text-to-Speech Thrifty Tibet Torres Del Paine Touch Tour d'Afrique Tour de France Tour Divide Tower Trail Running Train Trango Towers TransRockies Travel Trekking Triathlon Turkey Turner's Falls Tutorial Ueli Steck Ultra Running Ultramarathon UMass United States USA Pro Cycling Challenge User Interface Utah Vancouver Vermont Video Wadi Rum Wakhan Wanita dan Bisnis Water Websites Western Massachusetts Westhampton Widgets Wildlife Williamstown Wingsuits Winter Wisconsin Worcester World Championship Wyoming Yemen Yosemite Zoo





Parking is ample at the entrance to the trail. This is a walk filled with dogs, so be prepared for that. You will first encounter a wide lane, leading to a field, which borders the wooded area. You will arrive at the brook immediately upon entering the trees. There is a sturdy wooden bridge crossing the stream. It is neither deep nor fast, though in the spring might not be safe for a two year old. If your kids are like mine, you can then park yourself on a rock and drink your coffee while they throw rocks in the water. Have them wear their crocs/water shoes. When/If they tire of this activity, you can wander a number of little trails that all lead basically to the same area. You can't get lost. There are some smaller streams snaking through the woods that the kids have enjoyed bridging with branches and damming up with mud and rocks. Under the trees it is very shady, so early and late in the season it can be chillier than you thought.

















It's a splurge, at $6 per kid, but this is a really fun activity. Adults are free, but you will need to take your shoes off. Your child will get a bracelet in exchange for his shoes when you check in and pay. Benches and shoe racks for adult shoes are provided in the entry area.
In the middle of a cold snap there is nothing like romping around in an indoor play area. I like this one specifically because it is so modest. Your child doesn't get lost in a three story play structure, leaving you helpless on the ground. If the kids are older they might find this play area disappointing, I suppose, but mine don't yet. In addition to the playground, there is an open space with hula hoops, balls of various sizes, mats... It really encourages movement. Across the hall is a concession area with seating ("no outside food" - but the juice and small goldfish packets will be reasonably priced.) Next to the seating area is a play space with some dress up items, kitchen area, puzzle area, coloring. A little bit of everything but nothing that's especially nice. I've only been here once on the weekend and have zero desire to repeat that experience.
They offer lots of programs, and I think there is a great vibe here.
The parking is free, the bathrooms are great - stools and soap at every sink.

Universal Kids



The Jones is a wonderful library with a cozy and fun children's room. There is a story time on Thursday mornings at 10:30. Storytime is held in an adjacent room, which can be nice if you have several children and they can't all sit for a story. There is a very convenient restroom steps away from the main play area. It's very well equipped for changing diapers. This is the library of my childhood, so I admit bias.
In the basement of the building there is a large room for special events. One event I attended (travelling zoo) was so crowded we left. Another event (kids' pop band) was a lot of fun.
There are a few spaces on the street directly in front of the building, but you will probably end up parking in the lot across the street, at a meter. There is a crosswalk.

Jones Library


First, you'll find ample and convenient parking at the bottom of a long stairway. At the top you may head directly to the trail or into the Visitor Center. I have mixed feelings about this place. One thing that helps is when it's actually open- you can't count on it. The restrooms are functional at best, but several times they didn't even pass that test. When the main area is open to the public, it is a fun place to spend about 20 minutes with the kids. They have many bird specimens, and even a dinosaur footprint. The staff, when there, are friendly.
During the summer, Ranger Rich offers a WONDERFUL program on Saturday mornings. Each week has a theme which encompasses a story, an art project, and hands-on nature work, such as finding a pill bug and examining it under a magnifying glass, or taking a walk to discover birds' nests.
My favorite thing to do here is walk a short trail with the kids. At .75 miles, even a two year old can handle this hike. It is a short loop- no arguments about when to turn around, and the blazes are close together and easy to follow - good for teaching your kids about following them.


















This is an educational farm with many buildings on a rolling landscape. The buildings, land, and animals are well cared for. We've always accessed the property via the Larch Hill Trails by the Hitchcock Center, but there's an entrance by car off of 116.

From the Bramble Hill Farm Website:

The Farm shares a border with The Hitchcock Center (an Environmental Education Center) and the Common School ( a private K – 6 elementary school with a curriculum based on “in-depth studies and experiential learning”). Amherst College maintains several hundred acres of pasture land across Rt. 116 from the Farm, and the Town Conservation Commission maintains land along another Border. In 2004 the Larch Hill Collaborative was formed, with Bramble Hill Farm at the center, to bring these entities together into a working group around shared concerns for the sustainability of the land and the ecosystems which form the core of all of our individual work. The Farm welcomes projects and classes from The Hitchcock Center, The Common School, and other groups interested in learning about and creating from its’ diverse resources.

Bramble Hill Farm






































Parking is free - there are two lots, one directly in front of the ticketing area, and another across the street.
The Science Museum is the first building you'll see as you approach. This museum hosts the popular dinosaur exhibit once per year. Regular exhibits include an aquarium & terrarium area, many examples of stuffed animals, early American History, an Earth Sciences section, a planetarium (still looking forward to this - have removed myself due to crying both times I tried to take them in), and a dinosaur area.
The Science Museum hosts most of the special programs that are available at the Quadrangle. On certain days additional areas are opened - a really awesome activity room in the basement and a second area with art projects near the planetarium.
The gift shop is lovely, and set up pretty well so that the high end fragile stuff is on one side and the kid friendly stuff is on the other. Unfortunately it's impossible to avoid the gift shop because the seating area where you can have your lunch is literally inside the store. There are a few vending machines there, but otherwise no food for sale, so definitely bring your own. The restrooms are fine. The best one is the handicapped one located right in the entrance area.
We have a membership to this museum complex and it is a GREAT DEAL. The regular admission, the other museums that we can visit for free on the passport program, such as the Boston Children's Museum, the Boston Science Museum, or the Ecotarium. The special programs that they hold there, the permanent exhibits and the weekend family events... all of these make the membership very worthwhile for us.

Springfield Science Museum






























Look Park is beautiful. You'll have to pay a $4 fee per car as you enter. Then you can park wherever you like. There are a LOT of activities here.
Water pad: instead of a wading pool, they've created a concrete "pad" with motion detectors which are linked up to a couple dozen different fountains which randomly turn off and on. Though it seems like kids would fall, they rarely do. Plenty of benches and chaise lounges encircle the pad. Many are under small pavillions providing shade. Bathing suit activity. Fenced in with two points of entry/egress. Free.
Petting zoo: Corn from a little machine costs 50 cents. A path leads through a wooded area lined with animal exhibits. Bald Eagles, sheep, owls, mountain goats, peacocks, chickens, more. The animals are well cared for, but the area is not too fancy.
Three playgrounds (small, large, and extra large):
The small playground is located right outside the petting zoo (convenient distraction!) and near the train station.
The large playground is on the other side of the park, near a pavillion, a stream, and some restrooms.
The extra large playground is right next to the water pad and restrooms and has a toddler structure, two other large structures, and swings.
River running by for rock throwing.
Train: Each ticket is about $2, the ride is cute - 10 minutes maybe? The kids LOVE it.
Paddle Boats: The rental fee is not ideal, but the ride is fun.
Picnic Areas with BBQ (rental fee), several pavillions for rent.
Restrooms are located near the water pad and are ok.

Back in December, the Android Dev Phone 1 (ADP1) went on sale, giving developers access to unlocked hardware for their work. A few weeks ago, consumers with retail devices received an over the air update with the 1.1 release of Android. I know that many developers will be pleased to hear that today, our colleagues at HTC have released a 1.1 version of Android for the Android Dev Phone which you can install on your device. If you have questions about the process of updating your device, you can ask the mailing list we've set up for such questions.

This new system image is fully compatible with Android 1.1. To see a list of everything that's new, you can review the notes from the 1.1_r1 SDK. This update also includes support for searching by voice, and priced apps in the Android Market.

Some developers have asked about the support for copy-protected apps on developer devices, and indeed there is a limitation you should be aware of. Many developers are concerned about the unauthorized redistribution of their applications, so they make use of the copy-protection feature (known as "forward locking") which prevents applications from being copied off devices. However, developer phones like the ADP1 allow for unrestricted access to the device's contents, making it impossible to enforce copy protection. As a result, the Market application on such devices is not able to access copy protected apps, whether they are free or paid. If you choose to add copy protection when you upload your application to the Android Market, then you won't be able to test it on the ADP1's Android Market client. Your application will always be accessible to users who have standard configurations though, and if your application (whether it is free or paid) is not copy-protected it will appear on all devices, including developer configurations.

If you own an Android Developer Phone, I definitely suggest you take advantage of this update. There's lots of good stuff in there, and the new software is backward compatible with Android 1.0, too. The original 1.0 system image is also now available, you need to downgrade for any reason. Happy coding!

Some Android applications require to squeeze every bit of performance out of the UI toolkit and there are many ways to do so. In this article, you will discover how to speed up the drawing and the perceived startup time of your activities. Both these techniques rely on a single feature, the window's background drawable.

The term window background is a bit misleading however. When you setup your user interface by calling setContentView() on an Activity, Android adds your views to the Activity's window. The window however does not contain only your views, but a few others created for you. The most important one is, in the current implementation used on the T-Mobile G1, the DecorView, highlighted in the view hierarchy below:

A typical Android view hierarchy

The DecorView is the view that actually holds the window's background drawable. Calling getWindow().setBackgroundDrawable() from your Activity changes the background of the window by changing the DecorView's background drawable. As mentioned before, this setup is very specific to the current implementation of Android and can change in a future version or even on another device.

If you are using the standard Android themes, a default background drawable is set on your activities. The standard theme currently used on the T-Mobile G1 uses for instance a ColorDrawable. For most applications, this background drawable works just fine and can be left alone. It can however impacts your application's drawing performance. Let's take the example of an application that always draws a full screen opaque picture:

An opaque user interface doesn't need a window background

You can see on this screenshot that the window's background is invisible, entirely covered by an ImageView. This application is setup to redraw as fast as it can and draws at about 44 frames per second, or 22 milliseconds per frame (note: the number of frames per second used in this article were obtained on a T-Mobile G1 with my finger on the screen so as to reduce the drawing speed which would otherwise be capped at 60 fps.) An easy way to make such an application draw faster is to remove the background drawable. Since the user interface is entirely opaque, drawing the background is simply wasteful. Removing the background improves the performance quite nicely:

Remove the background for faster drawing

In this new version of the application, the drawing speed went up to 51 frames per second, or 19 milliseconds per frame. The difference of 3 milliseconds per is easily explained by the speed of the memory bus on the T-Mobile G1: it is exactly the time it takes to move the equivalent of a screenful of pixels on the bus. The difference could be even greater if the default background was using a more expensive drawable.

Removing the window's background can be achieved very easily by using a custom theme. To do so, first create a file called res/values/theme.xml containing the following:

<resources>
<style name="Theme.NoBackground" parent="android:Theme">
<item name="android:windowBackground">@null</item>
</style>
</resources>

You then need to apply the theme to your activity by adding the attribute android:theme="@style/Theme.NoBackground" to your <activity /> or <application /> tag. This trick comes in very handy for any app that uses a MapView, a WebView or any other full screen opaque view.

Opaque views and Android: this optimization is currently necessary because the Android UI toolkit is not smart enough to prevent the drawing of views hidden by opaque children. The main reason why this optimization was not implemented is simply because there are usually very few opaque views in Android applications. This is however something that I definitely plan on implementing as soon as possible and I can only apologize for not having been able to do this earlier.

Using a theme to change the window's background is also a fantastic way to improve the perceived startup performance of some of your activities. This particular trick can only be applied to activities that use a custom background, like a texture or a logo. The Shelves application is a good example:

Textured backgrounds are good candidates for window's background

If this application simply set the wooden background in the XML layout or in onCreate() the user would see the application startup with the default theme and its dark background. The wooden texture would only appear after the inflation of the content view and the first layout/drawing pass. This causes a jarring effect and gives the user the impression that the application takes time to load (which can actually be the case.) Instead, the application defines the wooden background in a theme, picked up by the system as soon as the application starts. The user never sees the default theme and gets the impression that the application is up and running right away. To limit the memory and disk usage, the background is a tiled texture defined in res/drawable/background_shelf.xml:

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/shelf_panel"
android:tileMode="repeat" />

This drawable is simply referenced by the theme:

<resources>
<style name="Theme.Shelves" parent="android:Theme">
<item name="android:windowBackground">@drawable/background_shelf</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

The same exact trick is used in the Google Maps application that ships with the T-Mobile G1. When the application is launched, the user immediately sees the loading tiles of MapView. This is only a trick, the theme is simply using a tiled background that looks exactly like the loading tiles of MapView.

Sometimes the best tricks are also the simplest so the next time you create an activity with an opaque UI or a custom background, remember to change the window's background.

Download the source code of the first example.

Download the source code of Shelves.

In the previous installment of Android Layout Tricks, I showed you how to use the <include /> tag in XML layout to reuse and share your layout code. I also mentioned the <merge /> and it's now time to learn how to use it.

The <merge /> was created for the purpose of optimizing Android layouts by reducing the number of levels in view trees. It's easier to understand the problem this tag solves by looking at an example. The following XML layout declares a layout that shows an image with its title on top of it. The structure is fairly simple; a FrameLayout is used to stack a TextView on top of an ImageView:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scaleType="center"
android:src="@drawable/golden_gate" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dip"
android:layout_gravity="center_horizontal|bottom"

android:padding="12dip"

android:background="#AA000000"
android:textColor="#ffffffff"

android:text="Golden Gate" />

</FrameLayout>

This layout renders nicely as we expected and nothing seems wrong with this layout:



A FrameLayout is used to overlay a title on top of an image


Things get more interesting when you inspect the result with HierarchyViewer. If you look closely at the resulting tree you will notice that the FrameLayout defined in our XML file (highlighted in blue below) is the sole child of another FrameLayout:

A layout with only one child of same dimensions can be removed

Since our FrameLayout has the same dimension as its parent, by the virtue of using the fill_parent constraints, and does not define any background, extra padding or a gravity, it is totally useless. We only made the UI more complex for no good reason. But how could we get rid of this FrameLayout? After all, XML documents require a root tag and tags in XML layouts always represent view instances.

That's where the <merge /> tag comes in handy. When the LayoutInflater encounters this tag, it skips it and adds the <merge /> children to the <merge /> parent. Confused? Let's rewrite our previous XML layout by replacing the FrameLayout with <merge />:

<merge xmlns:android="http://schemas.android.com/apk/res/android">

<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scaleType="center"
android:src="@drawable/golden_gate" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dip"
android:layout_gravity="center_horizontal|bottom"

android:padding="12dip"

android:background="#AA000000"
android:textColor="#ffffffff"

android:text="Golden Gate" />

</merge>

With this new version, both the TextView and the ImageView will be added directly to the top-level FrameLayout. The result will be visually the same but the view hierarchy is simpler:

Optimized view hierarchy using the merge tag

Obviously, using <merge /> works in this case because the parent of an activity's content view is always a FrameLayout. You could not apply this trick if your layout was using a LinearLayout as its root tag for instance. The <merge /> can be useful in other situations though. For instance, it works perfectly when combined with the <include /> tag. You can also use <merge /> when you create a custom composite view. Let's see how we can use this tag to create a new view called OkCancelBar which simply shows two buttons with customizable labels. You can also download the complete source code of this example. Here is the XML used to display this custom view on top of an image:

<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:okCancelBar="http://schemas.android.com/apk/res/com.example.android.merge">

<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:scaleType="center"
android:src="@drawable/golden_gate" />

<com.example.android.merge.OkCancelBar
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"

android:paddingTop="8dip"
android:gravity="center_horizontal"

android:background="#AA000000"

okCancelBar:okLabel="Save"
okCancelBar:cancelLabel="Don't save" />

</merge>

This new layout produces the following result on a device:

Creating a custom view with the merge tag

The source code of OkCancelBar is very simple because the two buttons are defined in an external XML file, loaded using a LayoutInflate. As you can see in the following snippet, the XML layout R.layout.okcancelbar is inflated with the OkCancelBar as the parent:

public class OkCancelBar extends LinearLayout {
public OkCancelBar(Context context, AttributeSet attrs) {
super(context, attrs);
setOrientation(HORIZONTAL);
setGravity(Gravity.CENTER);
setWeightSum(1.0f);

LayoutInflater.from(context).inflate(R.layout.okcancelbar, this, true);

TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.OkCancelBar, 0, 0);

String text = array.getString(R.styleable.OkCancelBar_okLabel);
if (text == null) text = "Ok";
((Button) findViewById(R.id.okcancelbar_ok)).setText(text);

text = array.getString(R.styleable.OkCancelBar_cancelLabel);
if (text == null) text = "Cancel";
((Button) findViewById(R.id.okcancelbar_cancel)).setText(text);

array.recycle();
}
}

The two buttons are defined in the following XML layout. As you can see, we use the <merge /> tag to add the two buttons directly to the OkCancelBar. Each button is included from the same external XML layout file to make them easier to maintain; we simply override their id:

<merge xmlns:android="http://schemas.android.com/apk/res/android">
<include
layout="@layout/okcancelbar_button"
android:id="@+id/okcancelbar_ok" />

<include
layout="@layout/okcancelbar_button"
android:id="@+id/okcancelbar_cancel" />
</merge>

We have created a flexible and easy to maintain custom view that generates an efficient view hierarchy:

The resulting hierarchy is simple and efficient

The <merge /> tag is extremely useful and can do wonders in your code. However, it suffers from a couple of limitation:

  • <merge /> can only be used as the root tag of an XML layout

  • When inflating a layout starting with a <merge />, you must specify a parent ViewGroup and you must set attachToRoot to true (see the documentation of the inflate() method)

In the next installment of Android Layout Tricks you will learn about ViewStub, a powerful variation of <include /> that can help you further optimize your layouts without sacrificing features.

Download the complete source code of this example.

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget