title: Android button size changes at different devices (width is set to dp)
body: <p>I am designing an app which needs the customized button. I made it by inheriting the Android Button and I set its width to 300dp in the layout xml. However, I found the size of button is changing on different devices. Here are the example:</p>
  
  <p>My UI in the <strong>original device</strong>: <a href="http://i.imgur.com/vzzXpaX.png" rel="nofollow">Galaxy S5</a></p>
  
  <p>My UI in the <strong>new device</strong>: <a href="http://i.imgur.com/gdlFSXQ.png" rel="nofollow">Nexus 5X</a></p>
  
  <p>My UI in <strong>another device</strong>: <a href="http://imgur.com/lVvsnZo" rel="nofollow">Galaxy Note4</a>
  (In this trial, I set the left button to use sp instead of dp)</p>
  
  <p>It seems the whole layout scale is smaller in my new device even though both of them are 1080 x 1920 pixels. </p>
  
  <p>I also try to use sp but it behaves the same (problem). My guess is the style? Can any one gives me more thoughts. Thanks!</p>
  
  <p>--- UPDATE ---
  Hi, let me rephrase my problem.</p>
  
  <p>I am looking for a way to make a button which width is fix to like (relatively) <strong>1/3 screen width at any device</strong>. And its text also changes accordingly. I think the ultimate way is to translate everything to pixel and assign those value manually in program. I used to think using dp and sp is an easy alternative to achieve it, but it turns out not :(</p>