You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not possible. The edges are just drawn on the canvas. In the next version, we want to switch to a recyclerview version, where the edges are drawn with an ItemDecoration, but I don't think it will be possible there either. At least for now. Furthermore it could be hard to differentiate the edges if they are overlapping (depending on the chosen algorithm).
hi. you can use thie code for clickable node :
adapter = object : AbstractGraphAdapter() {
// 4.2 ViewHolder should extend from `RecyclerView.ViewHolder`
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NodeViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.node, parent, false)
return NodeViewHolder(view)
}
override fun onBindViewHolder(holder: NodeViewHolder, position: Int) {
holder.textView.text = getNodeData(position).toString()
//set tag for on click data - you can save position or node data
holder.textView.tag=getNodeData(position).toString()
holder.textView.setOnclick{
//click node // get tag data in view clicked
}
}
}.apply {
// 4.3 Submit the graph
this.submitGraph(graph)
recycler.adapter = this
}
Is it somehow possible to make the edges clickable? For example, I want to start a new activity when the edge between two specific nodes is clicked.
The text was updated successfully, but these errors were encountered: