Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Expose fields for subclass.#49

Merged
bmelnychuk merged 1 commit into
bmelnychuk:masterbmelnychuk/AndroidTreeView:masterfrom
yehe01:masteryehe01/AndroidTreeView:masterCopy head branch name to clipboard
Jan 22, 2016
Merged

Expose fields for subclass.#49
bmelnychuk merged 1 commit into
bmelnychuk:masterbmelnychuk/AndroidTreeView:masterfrom
yehe01:masteryehe01/AndroidTreeView:masterCopy head branch name to clipboard

Conversation

@yehe01

@yehe01 yehe01 commented Jan 22, 2016

Copy link
Copy Markdown
Contributor

Hi,

The pull request changes are for the following reasons.

  1. I am currently writing a FileTreeView which has the interface

    public FileTreeView(Context context, File file) {
        super(context);
        TreeNode root = TreeNode.root();
        setUpNode(root, file);
        setRoot(root);
    }

    This requires creating a root node before initialising the superclass AndroidTreeView.

  2. mRoot usually needs to be visited in subclasses when writing a custom traverse method. I changed it to protected.

  3. I have the need to access the nodeContainer from others classes.
    For example, I want to set the background of a single row to a certain colour.

this.highlightedNode.getViewHolder().getView().setBackgroundColor(color);;

This would colour all the children nodes.

Instead, I would like to do something like this:

view = (TreeNodeWrapperView) this.highlightedNode.getViewHolder().getView();
view.getNodeContainer().setBackgroundColor(color);

@bmelnychuk

Copy link
Copy Markdown
Owner

Agree, make sense. I did not think about subclasses (I thought its customizable enough)

bmelnychuk added a commit that referenced this pull request Jan 22, 2016
Expose fields for subclass.
@bmelnychuk bmelnychuk merged commit 121d2fb into bmelnychuk:master Jan 22, 2016
@bmelnychuk

Copy link
Copy Markdown
Owner

Will update maven repo tomorrow

@yehe01

yehe01 commented Jan 27, 2016

Copy link
Copy Markdown
Contributor Author

Hi, has this been updated on maven repo?

@bmelnychuk

Copy link
Copy Markdown
Owner

Yes, version 1.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.