বৃহস্পতিবার, ১ আগস্ট, ২০১৩

android number picker default design changes in jelly bean and ice-cream sandwitch

Quoting from docs

If the current theme is derived from Theme the widget presents the current value as an editable input field with an increment button above and a decrement button below. Long pressing the buttons allows for a quick change of the current value. Tapping on the input field allows to type in a desired value.

You need to set your theme that is derieved from Theme like fro example Theme.NoTitleBar.Fullscreen

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingBottom="@dimen/activity_vertical_margin"     android:paddingLeft="@dimen/activity_horizontal_margin"     android:paddingRight="@dimen/activity_horizontal_margin"     android:paddingTop="@dimen/activity_vertical_margin"     tools:context=".MainActivity" >       <TextView         android:id="@+id/textView1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="@string/hello_world" />      <Button         android:id="@+id/button11"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentBottom="true"         android:layout_centerHorizontal="true"         android:text="Open" />  </RelativeLayout> 

dialog.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:theme = "@style/cust_dialog"     android:layout_height="fill_parent" >      <NumberPicker         android:id="@+id/numberPicker1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentTop="true"         android:layout_centerHorizontal="true"         android:layout_marginTop="64dp" />      <Button         android:id="@+id/button2"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_below="@+id/numberPicker1"         android:layout_marginLeft="20dp"         android:layout_marginTop="98dp"         android:layout_toRightOf="@+id/numberPicker1"         android:text="Cancel" />      <Button         android:id="@+id/button1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignBaseline="@+id/button2"         android:layout_alignBottom="@+id/button2"         android:layout_marginRight="16dp"         android:layout_toLeftOf="@+id/numberPicker1"         android:text="Set" />  </RelativeLayout> 

Then to display custom dialog

public class MainActivity extends Activity implements NumberPicker.OnValueChangeListener {     private  TextView tv;     static Dialog d ;     @Override     public void onCreate(Bundle savedInstanceState)     {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         tv = (TextView) findViewById(R.id.textView1);         tv.setOnTouchListener(new OnTouchListener() {              @Override             public boolean onTouch(View v, MotionEvent event) {                 if (event.getAction() == MotionEvent.ACTION_DOWN) {                        tv.setTextColor(Color.RED);                 }                 else if (event.getAction() == MotionEvent.ACTION_UP) {                         // set to normal color                      tv.setTextColor(0);                   }                  return true;             }               });         Button b = (Button) findViewById(R.id.button11);          b.setOnClickListener(new OnClickListener()          {              @Override             public void onClick(View v) {                  show();             }             });            }      @Override     public void onValueChange(NumberPicker picker, int oldVal, int newVal) {           Log.i("value is",""+newVal);       }      public void show()     {            final Dialog d=new Dialog(this,R.style.cust_dialog);          d.setTitle("NumberPicker");          d.setContentView(R.layout.dialog);          Button b1 = (Button) d.findViewById(R.id.button1);          Button b2 = (Button) d.findViewById(R.id.button2);          final NumberPicker np = (NumberPicker) d.findViewById(R.id.numberPicker1);          np.setMaxValue(100);          np.setMinValue(0);          np.setWrapSelectorWheel(false);          np.setOnValueChangedListener(this);          b1.setOnClickListener(new OnClickListener()          {           @Override           public void onClick(View v) {               tv.setText(String.valueOf(np.getValue()));               d.dismiss();            }               });          b2.setOnClickListener(new OnClickListener()          {           @Override           public void onClick(View v) {               d.dismiss();            }               });        d.show();       } } 

Styles.xml

</style>   <style name="cust_dialog" parent="@android:style/Theme.NoTitleBar.Fullscreen">  </style> 

Snap Shot

enter image description here

Source: http://stackoverflow.com/questions/17993192/android-number-picker-default-design-changes-in-jelly-bean-and-ice-cream-sandwit

Olympic Games Dana Vollmer Ryan Dempster Phelps NBC Olympics Live Olympic medal count Medal Count 2012

US stocks end mixed, close out a strong July

Trader Kevin Coulter, center, works on the floor of the New York Stock Exchange Monday, July 29, 2013. Stocks were inching lower on Monday morning as a big week for economic news got underway.(AP Photo/Richard Drew)

Trader Kevin Coulter, center, works on the floor of the New York Stock Exchange Monday, July 29, 2013. Stocks were inching lower on Monday morning as a big week for economic news got underway.(AP Photo/Richard Drew)

NEW YORK (AP) ? The stock market is ending mixed after wavering in response to the Federal Reserve's latest assessment of the U.S. economy.

July was still the best month for the market since January.

The Dow Jones industrial average fell 21 points, or 0.1 percent, to 15,499 Wednesday.

The Dow was up most of the day after the government reported that the U.S. economy grew more than economists expected in the second quarter.

The Standard & Poor's 500 index lost a fraction of a point to end at 1,685. The Nasdaq rose 10 points, or 0.3 percent, to 3,626.

Bond yields fell after the Fed said it would continue to support the economy.

Slightly more stocks rose then fell on the New York Stock Exchange. Volume was above average at 3.8 billion shares.

Associated Press

Source: http://hosted2.ap.org/APDEFAULT/f70471f764144b2fab526d39972d37b3/Article_2013-07-31-Wall%20Street-Close/id-90508113f3f946a79328ebed625e5171

Raspberry Pi memorial day royal caribbean liberace liberace Robbie Rogers indy 500

Avoid US taxes by forming a foreign merger

Business

22 hours ago

A tactic to avoid corporate taxes has U.S. companies on the move?merging with foreign firms and then setting up residence overseas.

On Monday, Michigan-based medicine manufacturer Perrigo agreed to buy the Irish drug company Elan for $8.6 billion. In the bargain, the combined company's headquarters will be in Ireland, which has a corporate tax rate of 12.5 percent, versus 35 percent in the U.S.

Just the day before, American advertising giant Omnicom Group announced plans for a $35 billion merger with France's Publicis Groupe, saying that the combined company's tax residence will be in the Netherlands, which has a 25 percent corporate tax rate.

(Read more: 3 mergers Cramer says investors shouldn't miss)

Analysts say such mergers are likely to continue.

"Without tax reform in the U.S., I think you will see more of these types of deals," said Ian Shane, a tax lawyer at Golenbock Eiseman Assor Bell & Peskoe.

"You have to start from the premise that most tax laws are a decade behind how business is done," he said. "More companies are global and looking globally, and taxes are part of the bottom line."

Calls to Omnicom from CNBC to discuss the tax issue in detail with were not immediately returned. A spokesman for Perrigo refused to speak on the record for this story.

In a conference call for reporters after Perrigo's announcement, however, Chief Financial Officer Nigel Cherkin acknowledged that being in Ireland would provide the company with more than $2 billion in tax deductions.

And Omnicom's CEO John Wren confirmed in a conference call after his firm's merger announcement that residence in the Netherlands was for tax purposes.

Michael Schwartz, director of accounting and taxes at the advisory firm WeiserMazars, said, "There is a tax on U.S. firms bringing profits from overseas, but if you're incorporated abroad, [the United States] can't tax it if you've merged with another company."

These recent mergers fly in the face of heavy criticism from those who say U.S.corporations don't pay their fair share of taxes in the first place and that loopholes allow most of them to avoid paying the full 35 percent rate.

In a Senate subcommittee hearing this past May, Apple was severely chastised for avoiding tens of billions of dollars in U.S. taxes on its income (all legally) by shifting the funds through a global web of offshore entities, including three that had no tax residency in any nation.

A report from the committee before the hearings said that those three entities were run by some of Apple's top executives but were located, on paper, in Ireland, though they in some cases had no employees.

(Read more:Experts predict long antitrust road for Omnicom, Publicis)

One entity reported $30 billion in net income for 2009-12, yet filed no corporate tax return and paid no income taxes to any government during those years, according to the report.

CEO Tim Cook defended Apple at the time saying, "We pay all the taxes we owe?every single dollar." He also insisted that the company doesn't rely on tax "gimmicks" and doesn't "stash money on some Caribbean island."

But it isn't necessary for U.S. firms to stash away money or rely on gimmicks in today's global economy, according to Shane, the tax lawyer.

"Countries in Europe and elsewhere are competing with each other with lower tax rates to bring in firms and have them headquartered there," Shane said. "They need revenues, but lower tax rates that bring in firms are much better than higher tax rates and not having anyone there," he added.

"Just look at the Netherlands," Shane said. "Firms headquartered there don't have to face rigid tax rules.They can apply for a ruling on the amount they want to pay and get it approved or not, just as long as they pay some taxes."

But a study released in December on U.S. corporate taxes stated that new companies are not avoiding the country in favor of tax havens. Among 918 new companies identified as multinationals with headquarters in the United States, just 27 were legally incorporated in tax havens.

"I think we can fine-tune our laws, but I don't see them as all that complicated," said Schwartz at WeiserMazars.

"Businesses don't all think alike when it comes to what they want when it comes to taxes. I actually think other countries will start to lean toward our model going forward," he said.

U.S. firms first pay income taxes to the countries in which profits were earned; the then pay additional U.S. taxes on any profits they bring home.

But since companies receive a tax credit for paying a foreign tax, the amount of tax they pay on foreign profits in the U.S. is equal to the difference between the U.S. rate and the foreign one. (For instance, a $100 profit in England at that country's 23 percent tax rate would come to $23 in those taxes. The amount paid to the U.S. on that $100 would total $12?the difference between 35 and 23.)

In a speech Tuesday, President Barack Obama said he wants to cut the corporate tax rate of 35 percent to 28 percent and give manufacturers a preferred rate of 25 percent. He also wants a minimum tax on foreign earnings as a tool against corporate tax avoidance and increased use of tax havens.

(Read more: Obama proposes 'grand bargain' on corporate tax rate, infrastructure)

But he tied the reform and the money generated by the tax overhaul to a mix of proposals such as funding for infrastructure projects and improving education at community colleges.

Congressional Republicans immediately condemned the plan, saying it further backs Obama's policies on taxes and spending "while leaving small businesses and American families behind." The GOP prefers a flat tax on corporate profits.

"They talk tax reform, but it's not going to happen," Shane said. "There's too much gridlock."

"In the meantime, U.S. firms will continue to explore other countries for what they think are better tax laws," he said.

? 2013 CNBC LLC. All Rights Reserved

Source: http://feeds.nbcnews.com/c/35002/f/663286/s/2f675b6d/sc/21/l/0L0Snbcnews0N0Cbusiness0Cavoid0Eus0Etaxes0Eforming0Eforeign0Emerger0E6C10A810A789/story01.htm

jessie j jessie j florida lotto Wade Robson powerball numbers American Idol 2013 mega millions