Using adapters
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..
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: https://github.com/jacobmoncur/QuiltViewLibrary/issues/14
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: https://github.com/jacobmoncur/QuiltViewLibrary/issues/14
— Reply to this email directly or view it on GitHubhttps://github.com/jacobmoncur/QuiltViewLibrary/issues/14#issuecomment-27880097 .
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 :
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/FrameLayout1" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" xmlns:app="http://schemas.android.com/apk/res/com.jake.quiltviewsample">
<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 ?
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 /
Hi,
I'd like to add you to my professional network on LinkedIn.
- Winson
Accept: https://www.linkedin.com/blink?simpleRedirect=c30Sdj8Qcz0TcPwVdPkRczoVdjR4imVLqnhxt6BSrCACdjB2sC5FdRAZumlbp6lOomxP9DhPpnlDnSlQqnpKqjRHpipxt6cJpnhFtCVFbnhPpnlDbmNJpjRDrCBHoS5Ot2pBt6BSrABDpl9BsD0ZoipzbmZWsn9BczlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&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=1zbmZWsn9BczlFbmRyqCUPpzRAqmkCtTx9e6oOpkxzgQ9Ql6BScSIVpAdTdAEOoQlxjR99ej93pTBilkN4jAFohCRHl6Rhsz0RhkUSh6dzu5dhp4tDp4lRkAlzjztTrTANtlgMk4RyiQ9mgSpDtSJmq5gPtPxysDESmDtctAp4kkpbglBle7gRdmAPqTx7iTp5oTBgokNnmntTiD9CjkNvqjxRgAgVsBl1gk5TiBcQlAtqqkFJskthgjRAqmZI9DhPpnlDnSlQqnpKqjRHpiphdzdAhktElApOrkphgjRKpmJLl6hFripKtmMZt2pzbmZWsn9BczlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead= Learn why we included this at the following link: https://www.linkedin.com/blink?simpleRedirect=3wUdPgZp4BBr6dFt79x9DhPpnlDnSlQqnpKqjRHpipIsBlBoSBSsCljsClJrThPtmcZoipzbmZWsn9BczlFbmRyqCUPpzRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I5962558002832642048_500&markAsRead= © 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA
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&msgID=I5962558002832642048_500&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
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&msgID=I5962558002832642048_500&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