“Barbershop” is a surprisingly gentle and light-hearted comedy about neighbors who work together to create a community and overcome adversity.

It is an unusual entry in the genre of films about African-American culture in that, despite taking place in an urban setting, it has chosen not to be gritty. The only gangsta we meet is trying to go straight, and he is rewarded for his efforts. The pregnant woman is married to her baby’s father. One character urges another not to use profanity.

Such starkly old-fashioned values occur often in black American society, of course; where they are rare is in MOVIES about black America.

The director is Tim Story, who is new, and two of the writers, Don D. Scott and Marshall Todd, are also new. But the third writer, and the one given story credit, is Mark Brown. He wrote and directed last year’s “Two Can Play That Game,” which offered a similarly pleasant view of black Americans as intelligent and unstereotyped. His lowbrow work on 1997’s “How to Be a Player” aside, I like the way he thinks.

The protagonist of “Barbershop” is the barbershop itself, a long-standing fixture in the lower-income Chicago south-side neighborhood where it resides. Through some fast, pedestrian exposition, we learn the shop has stood for three generations and is currently owned by Calvin Palmer (Ice Cube). He learned haircutting at his father’s elbow but has mildly expressed interest in opening a recording studio with his pregnant wife Jennifer (Jazsmin Lewis).

Coincidental with Calvin’s bigger dreams is the barbershop’s financial trouble. To avoid being foreclosed upon, Calvin seeks help from creepy loan shark Lester Wallace (a devil-voiced Keith David), who immediately announces plans to turn the barbershop into a strip club. Calvin has his recording studio money, but how can he let the barbershop go?

Ice Cube continues to be a lifeless screen presence, though he does smile occasionally here. But he presides over the film more than he stars in it, leaving room for a vivid cast of likable characters who inhabit the barbershop as employees and customers. Just when the film gets dull with a tedious bit of Ice Cube angst, it comes sailing back to legitimacy with some nice bit of dialogue or thoughtful character development.

There is old Eddie (Cedric the Entertainer), with a Bride of Frankenstein hairdo and an ample supply of barber wisdom; know-it-all college boy Jimmy (Sean Patrick Thomas); conflicted two-time convict Ricky (Michael Ealy), trying desperately to stay out of trouble; sass-mouthed Terri Jones (Eve), who compensates for being the lone female employee in the shop by fighting with everyone; West African transplant Dinka (Leonard Howze) with a romantic soul; and Isaac (Troy Garity), the only white person in the neighborhood or the movie.

All of these characters are given enough screen time to state their cases for why we should care about them, and all of them succeed. Even viewers removed from the specific culture portrayed here, and who are unfamiliar with the idea of barbershops being the souls of neighborhoods, will find much to relate to.

Separate from all this are two low-level thugs (Anthony Anderson and Lahmard Tate) who have stolen an ATM from a mini-mart. They do not fare as well as the barbershop characters; it reminds me of how “Cheers” episodes generally suffered when they were set outside the bar. The ATM subplot eventually ties in with the main story in a way that is too convenient to be respected.

In addition to that plot cop-out, there is some genericism in the dialogue early on, when the conversation at Calvin’s place centers around the men saying “Day-amn!” a lot and discussing ladies’ bottoms. Still, director Story and film editor John Carter establish real energy in those scenes, effectively cutting from one character to another during the rapid-fire dialogue and making us forget that a barbershop is not usually a very interesting locale.

And all is forgiven when Terri curses angrily and Calvin says, “Stop cussing. This ain’t ‘Def Comedy Jam.'” Here is a movie that has chosen to be different by being smarter and less abrasive than many of its cinematic brethren.

B (1 hr., 42 min.; PG-13, a lot of mid-level profanity and one F-word, some sexual dialogue.)