Как сделать закругленные углы и тень для макета в android любые примеры для справки? http://imgur.com/EecAwFXОкруглые границы для Android Layout
ответ
Создать rounde_corner.xml
в папку drawable
и вставьте следующий код в этом
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners android:radius="4dp"/>
</shape>
и применять, что, как background
в макете
Спасибо. Это кажется прекрасным. –
'Моя репутация меньше 15, поэтому я не могу голосовать за ваш голос. –
Хорошо, я сделаю, но через 4 минуты, потому что он предупреждает ошибку IDK почему? –
Попробуйте использовать cardview. Затем установите cardCornerRadius
для закругленных углов и cardElevation
для тени.
Check out this link for further documentation.
, например:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/material_blue_500"
android:paddingBottom="1dp">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/stock_detail_margin"
android:layout_marginEnd="@dimen/heading_item_extra_padding"
android:layout_marginLeft="@dimen/heading_item_extra_padding"
android:layout_marginRight="@dimen/heading_item_extra_padding"
android:layout_marginStart="@dimen/heading_item_extra_padding"
android:layout_marginTop="@dimen/stock_detail_margin"
app:cardCornerRadius="5dp"
app:cardElevation="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/txt_symbol"
style="@style/StockSymbolTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:hint="YHOO" />
<TextView
android:id="@+id/txt_company"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:hint="Yahoo Incorporated Inc."
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
app:cardBackgroundColor="@android:color/holo_orange_dark"
app:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/txt_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="57.90"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_percent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="-98.2%"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/txt_change_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="-2.44"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@android:color/white" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
Этот код производит этот вид макета:
- 1. Округлые границы для EditText Android
- 2. CSS Округлые границы
- 3. округлые повернутые границы для изображений в CSS3
- 4. CSS Округлые границы на столах
- 5. CSS3 Округлые и пунктирные границы?
- 6. android layout 50% выше и ниже границы
- 7. Градиент округлые границы и отображение: блок
- 8. HTML позиционирование Layout & Image границы
- 9. Android Layout Layout
- 10. layout in layout android
- 11. android custom searchView округлые углы
- 12. Округлые границы на углах изображений с градиентным фоном, который растягивается
- 13. простые округлые границы с JQuery или что-то другое
- 14. Округлые техника угловая коробка с изображениями все вокруг как границы
- 15. Re-usable layout android layout
- 16. Css округлые изображения с границы и некоторые дополнения
- 17. Android Studio layout layout как
- 18. Округлые граничит с JPanel
- 19. Android layout для определения экрана
- 20. Android Layout для устройств XLarge
- 21. Android Old Layout для кнопки
- 22. Android Layout для управления календарем
- 23. Android xml layout для listView
- 24. Resize PSD для Android Layout
- 25. Округлые номера
- 26. Округлые входные поля с YUI
- 27. Javascript Округлые углы для изображений
- 28. xml drawable and android layout
- 29. Relative Layout v/s Grid Layout для Android
- 30. Android-Gasture enabled layout layout со списками
ли вы пытаетесь что-то написать. Можете ли вы указать свою проблему? –