I am trying create one app and in my app I am trying to create border at bottom in button,but when I run application it shows border at top only,can anybody tell how to achieve this..following is my xml of UI?.........
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:context="com.example.button_pressed_effect_example.MainActivity" >
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="One"
android:id="@+id/button1"
android:background="@drawable/custom_btn_black_orange"
android:drawableBottom="@drawable/liti"
/>
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Two"
android:id="@+id/button2"
android:background="@drawable/custom_btn_black_orange"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
liti.xml
<layer-list /android">
<item android:left="10dp" android:bottom="10dp">
<shape android:shape="line">
<stroke android:width="10dp" android:color="#ffffff" />
</shape>
</item>
</layer-list> …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我添加了图像上传功能,它可以很好地处理除了摄像机图像之外的所有图像,每当我从图库中浏览摄像机图像和纵向图像旋转90度时.以下是我的代码片段..有人可以帮我吗?我遵循了很多教程但是所有这些教程在kikat中工作得很好..但是当同一个教程不适用于ics,软糖等时..
public class MainActivity extends Activity {
private Button browse;
private String selectedImagePath="";
private ImageView img;
private TextView messageText;
private static int SELECT_PICTURE = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
img = (ImageView)findViewById(R.id.imagevw);
browse=(Button)findViewById(R.id.browseimg);
messageText = (TextView)findViewById(R.id.messageText);
browse.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Picture"), SELECT_PICTURE);
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == …Run Code Online (Sandbox Code Playgroud)