Creating Complex Android XML Component

时间:2017-08-30 20:14:35

标签: android xml layout components

I'm trying to make the following xml list:

original list

By the time, I've got this:

my component (which will go inside a list)

Here is my XML component code:

list_item_issue.xml

import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl

position = int(17)
count = int(7)

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

url = input('Enter - ')

for i in range(count):
    html = urllib.request.urlopen(url, context=ctx).read()
    soup = BeautifulSoup(html, 'html.parser')
    url = soup('a')[position].get('href', None)
    print(url)

Here is my circle_line_shape.xml

  function myFunction(){
    input =document.querySelectorAll("#inputfield1 , #inputfield2");
    var i;
    for (i = 0; i <input.length; i++) {
    input[i].addEventListener("keypress", function() {
        alert("hi from"+this.id);
    });
    }
    }
    myFunction();

Problem is that I have no idea of how to make those circles + vertical lines aligned with the BubbleLayout like you can see on the original list image.

¿Shall I change my layout structure?

Thank you very much!

1 个答案:

答案 0 :(得分:0)

Use a RelativeLayout, not a Linear. Make the image view match_parent height. Make the bubble layout_toEndOf the image view. Make the relative_layout itself wrap_content. This will make the relative layout the hight of the bubble layout, and the image the height of the relative layout.