title: Is It possible to edit graphically an XML with custom objects?
body: <p>everytime I put a custom object in my views, the XML editor said me that It can't render the view, so I have to edit it programmatically (on the XML).
  Is there a solution to this?
  I think the 90% of view's of apps on play store has custom view.</p>
  
  <p>example of XML that fails:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android"
      android:background="#f2f2f2" android:gravity="right"&gt;
  &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" android:paddingTop="5dp" android:paddingBottom="5dp"
          android:id="@+id/messagecontainer" android:layout_marginLeft="92dp"&gt;
      &lt;TextView
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:id="@+id/messagedate" android:layout_gravity="right" android:gravity="right"
              android:textColor="#eeeeee" android:textSize="10dp" android:layout_marginLeft="50dp"
              /&gt;
      &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/messagename" android:gravity="right" android:layout_gravity="right"
              android:maxLength="20"
              android:textSize="10dp" android:textStyle="bold" android:textColor="#f1f1f1"/&gt;
      &lt;TextView
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:autoLink="web"
              android:id="@+id/messagetext" android:layout_gravity="right" android:gravity="right"
              android:paddingRight="5dp" android:textColor="#ffffff"
          android:layout_marginLeft="50dp" android:textSize="14dp"
          android:textIsSelectable="true" /&gt;
  
      &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:id="@+id/content_list" /&gt;
  &lt;/LinearLayout&gt;
  &lt;com.pkmmte.view.CircularImageView
          android:layout_width="36dp"
          android:layout_height="36dp"
          android:id="@+id/messageavatar"
          android:layout_margin="5dp" android:scaleType="center" android:visibility="visible"
          android:layout_gravity="bottom"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>and the error is:</p>
  
  <p><img src="https://i.stack.imgur.com/9AOuN.png" alt="enter image description here"></p>
  
  <pre><code>java.lang.NoClassDefFoundError: com/pkmmte/view/R$attr
  at com.pkmmte.view.CircularImageView.&lt;init&gt;(CircularImageView.java:44)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:413)
  at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
  at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:176)
  at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
  at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
  at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
  at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:410)
  at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:321)
  at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
  at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:708)
  at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:697)
  at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
  at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:697)
  at com.android.tools.idea.rendering.RenderService.render(RenderService.java:816)
  at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
  at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
  at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
  at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
  at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  at java.lang.Thread.run(Thread.java:695)
  </code></pre>