Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Can you post a picture of your 9-patch? It might be possible to extract parts of it to another type of drawable, then layer the customizable part (drawn with user defined color) under the fixed portions using a layer-list.</p> <p><strong>[Update]</strong> Based on the pic you posted, I'd trash the layer list idea, but we can still work something out. The idea would be to remove the colored border and internal dark background from the 9-patch entirely (fill that area in with the shadow color and opacity). Then nest 3 layouts in each other. The first would use the 9-patch as a background. The second would use the user-defined color as a background. The third would use your panel color as a background. The 9-patch would provide the proper margins to position the second (user-color) layout, and then you'd just add a layout_margin attribute to the second panel to position the inner most layout a few dps in.</p> <pre><code>&lt;LinearLayout android:id="@+id/PanelOuter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/shadow_nine_patch"&gt; &lt;LinearLayout android:id="@+id/PanelUserBorder" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/custom_border_width" android:background="@color/dialog_border_color_default"&gt; &lt;LinearLayout android:id="@+id/PanelContent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/custom_dialog_content_margin" android:background="@color/dialog_inner_color"&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Of course, you'd be responsible for finding the <code>PanelUserBorder</code> view in code and calling <a href="http://developer.android.com/reference/android/view/View.html#setBackgroundColor%28int%29" rel="nofollow"><code>setBackgroundColor()</code></a> with the proper user-defined color.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload