Android 如何创建族树结构?

Android 如何创建族树结构?,android,treeview,android-viewgroup,family-tree,Android,Treeview,Android Viewgroup,Family Tree,如何在Android中创建家族树结构 我已经尝试过不同类型的树结构,但是我找不到类似这种类型的设计结构,关于创建这种类型的树结构有什么想法吗 我目前正在使用创建树结构,使用这个库我可以在一个方向上创建树,问题是在这个库中,我不能同时创建一个具有“从上到下”和“从下到上”节点的树。您可以在Android WebView组件中使用一些基于web的家谱树库 下面是一个例子 以及守则: window.onload=函数(){ OrgChart.templates.family_template_

如何在Android中创建家族树结构

我已经尝试过不同类型的树结构,但是我找不到类似这种类型的设计结构,关于创建这种类型的树结构有什么想法吗


我目前正在使用创建树结构,使用这个库我可以在一个方向上创建树,问题是在这个库中,我不能同时创建一个具有“从上到下”和“从下到上”节点的树。

您可以在Android WebView组件中使用一些基于web的家谱树库

下面是一个例子

以及守则:

window.onload=函数(){
OrgChart.templates.family_template_11=Object.assign({},OrgChart.templates.ana);
OrgChart.templates.family_template_11.size=[200140];
OrgChart.templates.family_template_11.plus=“”;
OrgChart.templates.family_template_11.减号=”;
OrgChart.templates.family_template_11.node='';
OrgChart.templates.family_template_11.rippleRadius=45;
OrgChart.templates.family_template_11.name_1='{val}';
OrgChart.templates.family_template_11.name_2='{val}';
OrgChart.templates.family_template_11.name_3='{val}';
OrgChart.templates.family_template_11.title_1='{val}';
OrgChart.templates.family_template_11.title_2='{val}';
OrgChart.templates.family_template_11.title_3='{val}';
OrgChart.templates.family_template_11.img_0='';
OrgChart.templates.family_template_11.LinkAdjulator=
{
fromX:0,
fromY:0,
毒素:0,
玩具:0
};
OrgChart.templates.family_template_12=Object.assign({},OrgChart.templates.family_template_11);
OrgChart.templates.family_template_12.img_0='';
OrgChart.templates.family_template_12.LinkAdjulator=
{
fromX:0,
fromY:0,
毒素:0,
玩具:-95
};
OrgChart.templates.family_template_21=Object.assign({},OrgChart.templates.family_template_11);
OrgChart.templates.family_template_21.size=[335140];
OrgChart.templates.family_template_21.node='';
OrgChart.templates.family_template_21.img_1='';
OrgChart.templates.family_template_21.LinkAdjulator=
{
fromX:65,
fromY:0,
毒素:0,
玩具:-95
};
OrgChart.templates.family_template_22=Object.assign({},OrgChart.templates.family_template_21);
OrgChart.templates.family_template_22.LinkAdjulator=
{
fromX:-70,
fromY:0,
毒素:65,
玩具:-95
};
OrgChart.templates.family_template_23=Object.assign({},OrgChart.templates.family_template_21);
OrgChart.templates.family_template_23.img_1='';
OrgChart.templates.family_template_23.LinkAdjulator=
{
fromX:65,
fromY:0,
毒素:65,
玩具:-95
};
OrgChart.templates.family_template_24=Object.assign({},OrgChart.templates.family_template_21);
OrgChart.templates.family_template_24.img_0='';
OrgChart.templates.family_template_25=Object.assign({},OrgChart.templates.family_template_21);
OrgChart.templates.family_template_25.img_1='';
OrgChart.templates.family_template_31=Object.assign({},OrgChart.templates.family_template_21);
OrgChart.templates.family_template_31.size=[470140];
OrgChart.templates.family_template_31.node='';
OrgChart.templates.family_template_31.img_1='';
OrgChart.templates.family_template_31.img_2='';
OrgChart.templates.family_template_31.LinkAdjulator=
{
fromX:0,
fromY:0,
毒素:0,
玩具:-95
};
var chart=新组织结构图(document.getElementById(“树”){
标签:{
“族模板11”:{
模板:“族模板11”
},
“族模板21”:{
模板:“家庭模板21”
},
“族模板31”:{
模板:“家庭模板31”
},
“族模板22”:{
模板:“家庭模板22”
},
“族模板23”:{
模板:“家庭模板23”
},
“家庭模板24”:{
模板:“家庭模板24”
},
“族模板25”:{
模板:“家庭模板25”
},
“族模板12”:{
模板:“家庭模板12”
}
},
启用搜索:false,
NodeMouseClickBehavior:graph.action.none,
mouseScroolBehaviour:graph.action.zoom,
scaleInitial:graph.match.boundary,
节点绑定:{
名称1:“名称1”,
名称2:“名称2”,
名称3:“名称3”,
标题1:“标题1”,
标题2:“标题2”,
标题3:“标题3”,
img_0:“img0”,
img_1:“img1”,
img_2:“img2”
},
链接:[
{从“2”到“1”},
{从“3”到“1”},
{从“4”到“2”},
{从“5”到“2”},
{从“6”到“2”},
{从“7”到“2”},
{从“8”到“4”},
{从“9”到“4”},
{从“10”到“8”},
{从:“11”到“8”},
{从:“12”到“8”},
],
节点:[
{id:“1”,标签:[“家庭模板24”],姓名1:“乔治六世国王”,姓名2:“伊丽莎白女王”,标题2:“女王母亲”,img0:https://balkangraph.com/js/img/f1.png,img1:https://balkangraph.com/js/img/f2.png" },
{id:“2”,标签:[“family_template_25”],姓名1:“Philip亲王”,姓名2:“伊丽莎白女王二世”,标题1:“爱丁堡公爵”,img0::https://balk