Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using adapters #14

Open
winsonlim opened this issue Nov 6, 2013 · 7 comments
Open

Using adapters #14

winsonlim opened this issue Nov 6, 2013 · 7 comments

Comments

@winsonlim
Copy link

Hi, how do we use .setAdapter to load the quiltview? The normal addPatchViews is giving me oom error..

When I set an array adapter, the quiltview doesn't get loaded. When I print log, getView in the adapter gets called though..

@jacobmoncur
Copy link
Owner

The quiltviews base view is a GridLayout which is not a view a that recycles it's children naturally so you need to be careful how many patches (or children) you add to it. I found that over 100 patches got to be iffy with out of memory errors. I hope to add recycling to it soon time allowing.


Jacob

On Wed, Nov 6, 2013 at 7:04 AM, winsonlim [email protected]
wrote:

Hi, how do we use .setAdapter to load the quiltview? The normal addPatchViews is giving me oom error..

When I set an array adapter, the quiltview doesn't get loaded. When I print log, getView in the adapter gets called though..

Reply to this email directly or view it on GitHub:
#14

@winsonlim
Copy link
Author

I see.. It must be my huge bitmaps hogging the memory then. Looking forward
to using adapters for QuiltView in the future :-)

Also, thanks for sharing this library, it really aided me well in my
project...
On 6 Nov, 2013 11:02 pm, "Jacob Moncur" [email protected] wrote:

The quiltviews base view is a GridLayout which is not a view a that
recycles it's children naturally so you need to be careful how many patches
(or children) you add to it. I found that over 100 patches got to be iffy
with out of memory errors. I hope to add recycling to it soon time
allowing.


Jacob

On Wed, Nov 6, 2013 at 7:04 AM, winsonlim [email protected]
wrote:

Hi, how do we use .setAdapter to load the quiltview? The normal
addPatchViews is giving me oom error..
When I set an array adapter, the quiltview doesn't get loaded. When I

print log, getView in the adapter gets called though..

Reply to this email directly or view it on GitHub:
#14


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-27880097
.

@longvd89
Copy link

longvd89 commented Dec 3, 2013

i using Quiltview Demo . i have error in line code : setContentView(R.layout.activity_main);

@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);
    quiltView = (QuiltView) findViewById(R.id.quilt);
    quiltView.setChildPadding(5);
    addTestQuilts(200);
}

i think error in in file activity_man.xml :

<com.jake.quiltview.QuiltView
    android:id="@+id/quilt"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="5dip"
    app:scrollOrientation="vertical" >
</com.jake.quiltview.QuiltView>

What is problem ?

@silwek
Copy link

silwek commented Jan 10, 2014

I change

private void setViewsFromAdapter(Adapter adapter) {
    this.removeAllViews();
    for(int i = 0; i < adapter.getCount(); i++){
        quilt.addPatch(adapter.getView(i, null, quilt));
    }
}

to

private void setViewsFromAdapter(Adapter adapter) {
    quilt.removeAllViews();
    for(int i = 0; i < adapter.getCount(); i++){
        quilt.addPatch(adapter.getView(i, null, quilt));
    }
}

and my items appear \ o /

@winsonlim
Copy link
Author

Winson Lim would like to connect on LinkedIn. How would you like to respond?

Accept: https://www.linkedin.com/blink?simpleRedirect=0Mc3oRczgOc3sPe3ATdjkOdzARfkh9rCZFt65QqnpKqioRek9OomATmjRVpkJApn9xq7cCej5vs7xBnTpKqjRHpipOpmhKqmRBsyRQs6lzoS4JoyRDtCVFnSRJrScJr6RBfmtKqmJzon9Q9ClQqnpKimtBkClOs3Rx9DwObjAMdjoPdjlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

View Winson Lim's profile: https://www.linkedin.com/blink?simpleRedirect=ej5vs7xBnTpKqjRHpipOpmhKqmRBsyRQs6lzoS4JoyRDtCVFnSRJrScJr6RBfmtKqmJzon9Q9DpMrzRQ9DwObjAMdjoPdjlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

You are receiving Reminder emails for pending invitations. Unsubscribe here: https://www.linkedin.com/blink?simpleRedirect=rmZzhj8BoDlEt6BDhj8BumNMpn8Md2kPcP4VdzoQbjlydPtAc6oUe38Rd3cVp3pBe3lBoP8VdPgQpm4Roj1CoPgNe39Bcj8JdjwVdjANcz8Jqk8O9nBIs6lOfmNFomRB9z0Sc30OfmhF9z0MdzkOd38MdPcUejsRdj8SejkZp6BD9zANnT1UplZSrCAZqSkCoDlPrDkJpyRzoClJnSRJrScJr6RBfmtKqmJzon9Q9CZLpPRQ9DwObjAMdjoPdjlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

You received an invitation to connect. LinkedIn will use your email address to make suggestions to our members in features like People You May Know. Unsubscribe here: https://www.linkedin.com/blink?simpleRedirect=1UcyQVc3kScPkRqiRJoCFKcSoZp6BB9BBHr6BmdR13c4dRpBZTpBpms4dAlPlOsR9Hhnlqhlx8i55Ik5lEr4d6lD1Jqmh3qkJ8lP9Rr6ZxgmNDhkVEpmMJtzpWtB9Lt5ldpPlAlDBQdjp4m55CnORWs5pldl5TqCR6q4sNdSdCs59EjmcTe6QMdC5Fh5oQi3tAr6dvrkBqcnhPmCJ2kltAiCgNpmNPhTdlgk51tQlKu4IUsjdSgCh7kk4Zp6BLr2oVclZMu6lvtCVFfmJB9B4ScSh5hSxmhD9JhB51fmVBqSZkp6BJ9CVRr3RQ9DwObjAMdjoPdjlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&amp;msgID=I5962558002832642048_500&amp;markAsRead= Learn why we included this at the following link: https://www.linkedin.com/blink?simpleRedirect=0Ue3sQfmh9pmNzqnhOoioVclZMu6lvtCVFfmJB9CNOlmlzqnpOpldOpmRLt7dRoPRx9DwObjAMdjoPdjlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=
© 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA

@winsonlim
Copy link
Author

Winson Lim would like to connect on LinkedIn. How would you like to respond?

Accept: https://www.linkedin.com/blink?simpleRedirect=0Mc3oRczgOc3sPe3ATdjkOdzARfkh9rCZFt65QqnpKqioRek9OomATmjRVpkJApn9xq7cCej5vs7xBnTpKqjRHpipOpmhKqmRBsyRQs6lzoS4JoyRDtCVFnSRJrScJr6RBfmtKqmJzon9Q9ClQqnpKimtBkClOs3Rx9zcQbmZEuCJOp3lFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

View Winson Lim's profile: https://www.linkedin.com/blink?simpleRedirect=ej5vs7xBnTpKqjRHpipOpmhKqmRBsyRQs6lzoS4JoyRDtCVFnSRJrScJr6RBfmtKqmJzon9Q9DpMrzRQ9zcQbmZEuCJOp3lFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

You are receiving Reminder emails for pending invitations. Unsubscribe here: https://www.linkedin.com/blink?simpleRedirect=rmZzhj8BoDlEt6BDhj8BumNMpn8Md2kPcP4VdzoQbjlydPtAc6oUe38Rd3cVp3pBe3lBoP8VdPgQpm4Roj1CoPgNe39Bcj8JdjwVdjANcz8Jqk8O9nBIs6lOfmNFomRB9z0Sc30OfmhF9z0MdzkOd38MdPcUejsRdj8SejkZp6BD9zANnT1UplZSrCAZqSkCoDlPrDkJpyRzoClJnSRJrScJr6RBfmtKqmJzon9Q9CZLpPRQ9zcQbmZEuCJOp3lFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=

You received an invitation to connect. LinkedIn will use your email address to make suggestions to our members in features like People You May Know. Unsubscribe here: https://www.linkedin.com/blink?simpleRedirect=0Pd2RLq7FHsCgRqiRJoCFKcSoZp6BB9Cd1r3hcp6APe75PrAFdi6tSpAtcpPlSgRtzjPBBqCpcjmdUj4AUdS4Usj9LhBtvlmNRu4J9pQVCdTtTkjt3jRlooBhvmztNoAhKq5lqc4hAt45Njn8VkmBjoS9dqkZDs3tCsTcPtANKl7lxk697l2RlgiQJhRARi4dlsB9vrnxOiTFdhTgSt4RVoBpMiloJr7dlgk51tTBorSxysSpnu6h7kk4Zp6BLr2oVclZMu6lvtCVFfmJB9B4ScSh5hSxmhD9JhB51fmVBqSZkp6BJ9CVRr3RQ9zcQbmZEuCJOp3lFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&amp;msgID=I5962558002832642048_500&amp;markAsRead= Learn why we included this at the following link: https://www.linkedin.com/blink?simpleRedirect=0Ue3sQfmh9pmNzqnhOoioVclZMu6lvtCVFfmJB9CNOlmlzqnpOpldOpmRLt7dRoPRx9zcQbmZEuCJOp3lFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead=
© 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA

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

No branches or pull requests

4 participants