how to put a border around an android relativelayout?
问题 I've seen this subject about puting a border around an android textview, and I used it. But now, I would like to put a border around widgets which are situated into a relative layout. How can I do it? 回答1: in your res/drawable folder, create a new file background_border.xml In this file, you will define the background for widget like this: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <!-- This is the stroke you want to define --> <stroke