Guest User

Untitled

a guest
Jan 5th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.50 KB | None | 0 0
  1. package first.project;
  2.  
  3.  
  4. import java.util.ArrayList;
  5. import java.util.List;
  6. import org.w3c.dom.Document;
  7. import org.w3c.dom.Element;
  8. import org.w3c.dom.Node;
  9. import org.w3c.dom.NodeList;
  10. import android.content.Intent;
  11. import android.graphics.Typeface;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.AdapterView;
  15. import android.widget.AdapterView.OnItemClickListener;
  16. import android.widget.ArrayAdapter;
  17. import android.widget.ListView;
  18. import android.widget.TextView;
  19. import android.widget.Toast;
  20.  
  21. public class forparse extends second{
  22. String xml;
  23. Boolean description=false,attcolor=false,attsize=false,attjacket=false,attnestedsuitsize=false,attjacketpantstyle=false,attfrontinseam=false,attwaist=false,attcolorsize=false,imtitle=false,imurl=false;
  24. Boolean attribute=false,attshirtsize=false,attpantsize=false,attshirtcolor=false,attpantcolor=false,attwaistinseam=false;
  25. Document doc;
  26. Element e,se;
  27. NodeList ncategories,nsubcat,n;
  28. Node fstNode;
  29. List<String> CategoryId=new ArrayList<String>();
  30. List<String> CategoryName=new ArrayList<String>();
  31. List<String> SubCatsId=new ArrayList<String>();
  32. List<String> SubCatId=new ArrayList<String>();
  33. List<String> SubCatsName=new ArrayList<String>();
  34. List<String> SubCatName=new ArrayList<String>();
  35. List<String> ProductsId=new ArrayList<String>();
  36. List<String> ProductsName=new ArrayList<String>();
  37. ListView lv_parse;
  38. TextView tv_product;
  39. @Override
  40. public void onCreate(Bundle savedInstanceState) {
  41. // TODO Auto-generated method stub
  42. super.onCreate(savedInstanceState);
  43. setContentView(R.layout.parse);
  44. tv_product=(TextView)findViewById(R.id.tv_pro);
  45. Bundle extra=getIntent().getExtras();
  46. if(extra!=null){
  47. String temp=extra.getString("product");
  48. Typeface font=Typeface.createFromAsset(getAssets(), "fonts/TrajanPro-Regular.otf");
  49. tv_product.setTypeface(font);
  50. tv_product.setText(temp);
  51. }
  52.  
  53. lv_parse=(ListView)findViewById(R.id.lv_parsexml);
  54. /*try {
  55. xml= Parser.getXML(getAssets().open("original.xml"));
  56. }catch (IOException e) {
  57. e.printStackTrace();
  58. }*/
  59. xml = Parser.getXMLstring("http://justlinen.nopcommerce.net/ProductXML.aspx");
  60. Toast.makeText(this,xml,Toast.LENGTH_LONG).show();
  61. doc = Parser.XMLfromString(xml);
  62.  
  63. String starttag=doc.getFirstChild().getNodeName();
  64. ncategories = doc.getElementsByTagName(starttag);
  65. int f = 0,t=0;
  66. for(int i=0;i<ncategories.getLength();i++){
  67. e=(Element)ncategories.item(i);
  68. n=e.getElementsByTagName("Category");
  69. for(int c=0;c<n.getLength();c++){
  70. e=(Element)n.item(c);
  71. Node ns=e.getParentNode();
  72. String ne=ns.getNodeName();
  73. if(ne.equalsIgnoreCase("Categories")){
  74. CategoryName.add(Parser.getValue(e, "Name"));
  75. CategoryId.add(Parser.getValue(e, "ID"));
  76. f++;
  77. }else if(ne.equalsIgnoreCase("SubCategories")){
  78. Node npa=ns.getParentNode();
  79. String np=ns.getParentNode().getNodeName();
  80. if(np.equalsIgnoreCase("Category")){
  81. String npar=npa.getParentNode().getNodeName();
  82. if(npar.equalsIgnoreCase("SubCategories")){
  83. SubCatId.add(Parser.getValue(e, "ID"));
  84. SubCatName.add(Parser.getValue(e, "Name"));
  85. }else if(npar.equalsIgnoreCase("Categories")){
  86. SubCatsId.add(Parser.getValue(e, "ID"));
  87. SubCatsName.add(Parser.getValue(e, "Name"));
  88. }
  89. }
  90. }
  91. }
  92. }
  93. ncategories = doc.getElementsByTagName("Product");
  94. for(int i=0;i<ncategories.getLength();i++){
  95. Element epro=(Element)ncategories.item(i);
  96. ProductsId.add(Parser.getValue(epro, "ID"));
  97. ProductsName.add(Parser.getValue(epro, "Name"));
  98. }
  99. lv_parse.setAdapter(new ArrayAdapter<String>(this,R.layout.raw,R.id.tv_parse,CategoryName));
  100. lv_parse.setTextFilterEnabled(true);
  101. lv_parse.setOnItemClickListener(new OnItemClickListener(){
  102.  
  103.  
  104. @Override
  105. public void onItemClick(AdapterView<?> arg0, View v, int position,
  106. long arg3) {
  107. // TODO Auto-generated method stub
  108. Parserxml Parse=new Parserxml();
  109. Parse.Documentparser(CategoryId.get(position),CategoryName.get(position));
  110. }
  111. });
  112. }
  113. public void OnClick(View v){
  114. switch(v.getId()){
  115. case R.id.iv_back:
  116. forparse.this.finish();
  117. break;
  118. }
  119. }
  120. public class Parserxml {
  121. public void Documentparser(String id, String name) {
  122. int flag=0;
  123. Intent in;
  124. NodeList nmainpro;
  125. Boolean Category=false,Subcats=false,Childcat=false,Products=false;
  126. List<String> Name = new ArrayList<String>();
  127. List<String> ID = new ArrayList<String>();
  128. List<String> Description=new ArrayList<String>();
  129. List<String> AttColor=new ArrayList<String>();
  130. List<String> AttSize=new ArrayList<String>();
  131. List<String> AttJacket=new ArrayList<String>();
  132. List<String> AttJacketPantStyle=new ArrayList<String>();
  133. List<String> AttWaist=new ArrayList<String>();
  134. List<String> AttFrontInSeam=new ArrayList<String>();
  135. List<String> AttNestedSuitSize=new ArrayList<String>();
  136. List<String> AttColorSize=new ArrayList<String>();
  137. List<String> AttWaistInSeam=new ArrayList<String>();
  138. List<String> AttShirtSize=new ArrayList<String>();
  139. List<String> AttPantSize=new ArrayList<String>();
  140. List<String> AttShirtColor=new ArrayList<String>();
  141. List<String> AttPantColor=new ArrayList<String>();
  142. List<String> ImTitle=new ArrayList<String>();
  143. List<String> ImURL=new ArrayList<String>();
  144.  
  145. //////////////////////////////////////////////////////////////////////////////////////////////////
  146.  
  147. for(int k=0;k<1;k++){
  148. for(int i=0;i<CategoryId.size();i++){
  149. if(CategoryId.get(i).equalsIgnoreCase(id)){
  150. Category=true;
  151. flag=1;
  152. break;
  153. }
  154. }
  155. if(flag==1){
  156. break;
  157. }
  158. for(int i=0;i<SubCatsId.size();i++){
  159. if(SubCatsId.get(i).equalsIgnoreCase(id)){
  160. Subcats=true;
  161. flag=1;
  162. break;
  163. }
  164. }
  165. if(flag==1){
  166. break;
  167. }
  168. for(int i=0;i<SubCatId.size();i++){
  169. if(SubCatId.get(i).equalsIgnoreCase(id)){
  170. Childcat=true;
  171. flag=1;
  172. break;
  173. }
  174. }
  175. if(flag==1){
  176. break;
  177. }
  178. for(int i=0;i<ProductsId.size();i++){
  179. if(ProductsId.get(i).equalsIgnoreCase(id)){
  180. Products=true;
  181. flag=1;
  182. break;
  183. }
  184. }
  185. if(flag==1){
  186. break;
  187. }
  188. }
  189. /////////////////////////////////////////////////////////////////////////////////////////////
  190. if(Category){
  191. // n=doc.getElementsByTagName("Category");
  192. int c=0;
  193. for(int i=0;i<n.getLength();i++){
  194.  
  195. e=(Element)n.item(i);
  196. if(e.getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  197. if(CategoryId.get(c).equalsIgnoreCase(id)){
  198. // for mainproducts
  199. nmainpro=e.getElementsByTagName("Products");
  200. for(int p=0;p<nmainpro.getLength();p++){
  201. Element emainproducts=(Element)nmainpro.item(p);
  202. Node npropar=emainproducts.getParentNode().getParentNode();
  203. if(npropar.getNodeName().equalsIgnoreCase("Categories")){
  204. NodeList nmainproduct=emainproducts.getElementsByTagName("Product");
  205. for(int m=0;m<nmainproduct.getLength();m++){
  206. Element emainproduct=(Element)nmainproduct.item(m);
  207. ID.add(Parser.getValue(emainproduct, "ID"));
  208. Name.add(Parser.getValue(emainproduct, "Name"));
  209. }
  210. }
  211. }
  212.  
  213. //for subcategories
  214. nmainpro=e.getElementsByTagName("SubCategories");
  215. for(int p=0;p<nmainpro.getLength();p++){
  216. Element emainproducts=(Element)nmainpro.item(p);
  217. NodeList nmainproduct=emainproducts.getElementsByTagName("Category");
  218. for(int m=0;m<nmainproduct.getLength();m++){
  219. Element emainproduct=(Element)nmainproduct.item(m);
  220. if(emainproduct.getParentNode().getParentNode().getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  221. ID.add(Parser.getValue(emainproduct, "ID"));
  222. Name.add(Parser.getValue(emainproduct, "Name"));
  223. }
  224. }
  225. }
  226. break;
  227. }
  228. c++;
  229. }
  230. }
  231. in=new Intent(forparse.this,SubCategories.class);
  232. in.putExtra("parent",name);
  233. in.putStringArrayListExtra("name",(ArrayList<String>) Name);
  234. in.putStringArrayListExtra("id",(ArrayList<String>) ID);
  235. startActivity(in);
  236. }else if(Subcats){
  237. // n=doc.getElementsByTagName("Category");
  238. for(int i=0;i<n.getLength();i++){
  239. e=(Element)n.item(i);
  240. String temp=Parser.getValue(e, "ID");
  241. if(temp.equalsIgnoreCase(id)){
  242. nmainpro=e.getElementsByTagName("Products");
  243. for(int p=0;p<nmainpro.getLength();p++){
  244. Element emainproduct=(Element)nmainpro.item(p);
  245. if(emainproduct.getParentNode().getParentNode().getParentNode().getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  246. NodeList npro=emainproduct.getElementsByTagName("Product");
  247. for(int c=0;c<npro.getLength();c++){
  248. Element epro=(Element)npro.item(c);
  249. ID.add(Parser.getValue(epro, "ID"));
  250. Name.add(Parser.getValue(epro, "Name"));
  251. }
  252. }
  253. }
  254. nmainpro=e.getElementsByTagName("SubCategories");
  255. for(int p=0;p<nmainpro.getLength();p++){
  256. Element emainproduct=(Element)nmainpro.item(p);
  257. if(emainproduct.getParentNode().getParentNode().getParentNode().getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  258. NodeList npro=emainproduct.getElementsByTagName("Category");
  259. for(int c=0;c<npro.getLength();c++){
  260. Element epro=(Element)npro.item(c);
  261. ID.add(Parser.getValue(epro, "ID"));
  262. Name.add(Parser.getValue(epro, "Name"));
  263. }
  264. }
  265. }
  266. break;
  267. }
  268. }
  269. in=new Intent(forparse.this,SubCategory.class);
  270. in.putExtra("parent",name);
  271. in.putStringArrayListExtra("name",(ArrayList<String>) Name);
  272. in.putStringArrayListExtra("id",(ArrayList<String>) ID);
  273. startActivity(in);
  274. }else if(Childcat){
  275. // n=doc.getElementsByTagName("Category");
  276. for(int i=0;i<n.getLength();i++){
  277. e=(Element)n.item(i);
  278. String temp=Parser.getValue(e, "ID");
  279. if(temp.equalsIgnoreCase(id)){
  280. nmainpro=e.getElementsByTagName("Products");
  281. for(int p=0;p<nmainpro.getLength();p++){
  282. Element emainproduct=(Element)nmainpro.item(p);
  283. if(emainproduct.getParentNode().getParentNode().getParentNode().getParentNode().getParentNode().getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  284. NodeList npro=emainproduct.getElementsByTagName("Product");
  285. for(int c=0;c<npro.getLength();c++){
  286. Element epro=(Element)npro.item(c);
  287. ID.add(Parser.getValue(epro, "ID"));
  288. Name.add(Parser.getValue(epro, "Name"));
  289. }
  290. }
  291. }
  292. nmainpro=e.getElementsByTagName("SubCategories");
  293. for(int p=0;p<nmainpro.getLength();p++){
  294. Element emainproduct=(Element)nmainpro.item(p);
  295. if(emainproduct.getParentNode().getParentNode().getParentNode().getParentNode().getParentNode().getParentNode().getNodeName().equalsIgnoreCase("Categories")){
  296. NodeList npro=emainproduct.getElementsByTagName("Category");
  297. for(int c=0;c<npro.getLength();c++){
  298. Element epro=(Element)npro.item(c);
  299. ID.add(Parser.getValue(epro, "ID"));
  300. Name.add(Parser.getValue(epro, "Name"));
  301. }
  302. }
  303. }
  304. break;
  305. }
  306. }
  307. in=new Intent(forparse.this,ChildSubCategory.class);
  308. in.putExtra("parent",name);
  309. in.putStringArrayListExtra("name",(ArrayList<String>) Name);
  310. in.putStringArrayListExtra("id",(ArrayList<String>) ID);
  311. startActivity(in);
  312. }else if(Products){
  313. n=doc.getElementsByTagName("Product");
  314. for(int i=0;i<n.getLength();i++){
  315. Node fstnode=n.item(i);
  316. if(fstnode.getNodeType()==Node.ELEMENT_NODE){
  317. e=(Element)n.item(i);
  318. if(ProductsId.get(i).equalsIgnoreCase(id)){
  319.  
  320. // for products detail
  321. ID.add(Parser.getValue(e, "ID"));
  322. Name.add(Parser.getValue(e, "Name"));
  323. Description.add(Parser.getValue(e, "Description"));
  324. for(int ate=0;ate<e.getChildNodes().getLength();ate++){
  325. Node natt=e.getChildNodes().item(ate);
  326. if(natt.getNodeName().equalsIgnoreCase("Attribute")){
  327. attribute=true;
  328. NodeList att=e.getElementsByTagName("Attribute");
  329. for(int a=0;a<att.getLength();a++){
  330. Element at=(Element)att.item(a);
  331. for(int atc=0;atc<at.getChildNodes().getLength();atc++){
  332. Node atnode=at.getChildNodes().item(atc);
  333. if(atnode.getNodeName().equalsIgnoreCase("Color")){
  334. attcolor=true;
  335. }
  336. if(atnode.getNodeName().equalsIgnoreCase("Size")){
  337. attsize=true;
  338. }
  339. if(atnode.getNodeName().equalsIgnoreCase("Jacket")){
  340. attjacket=true;
  341. }
  342. if(atnode.getNodeName().equalsIgnoreCase("JacketPantStyle")){
  343. attjacketpantstyle=true;
  344. }
  345. if(atnode.getNodeName().equalsIgnoreCase("NestedSuitSize")){
  346. attnestedsuitsize=true;
  347. }
  348. if(atnode.getNodeName().equalsIgnoreCase("ColorSize")){
  349. attcolorsize=true;
  350. }
  351. if(atnode.getNodeName().equalsIgnoreCase("Waist")){
  352. attwaist=true;
  353. }
  354. if(atnode.getNodeName().equalsIgnoreCase("FrontInseam")){
  355. attfrontinseam=true;
  356. }
  357. if(atnode.getNodeName().equalsIgnoreCase("ShirtSize")){
  358. attshirtsize=true;
  359. }
  360. if(atnode.getNodeName().equalsIgnoreCase("PantSize")){
  361. attpantsize=true;
  362. }
  363. if(atnode.getNodeName().equalsIgnoreCase("ShirtColor")){
  364. attshirtcolor=true;
  365. }
  366. if(atnode.getNodeName().equalsIgnoreCase("PantColor")){
  367. attpantcolor=true;
  368. }
  369. if(atnode.getNodeName().equalsIgnoreCase("WaistInseam")){
  370. attwaistinseam=true;
  371. }
  372. }
  373. NodeList nat;
  374. Element eat;
  375. if(attcolor){
  376. nat=at.getElementsByTagName("Color");
  377. for(int pat=0;pat<nat.getLength();pat++){
  378. eat=(Element)nat.item(pat);
  379. AttColor.add(Parser.getValue(eat, "Color"));
  380. }
  381. }
  382. if(attsize){
  383. nat=at.getElementsByTagName("Size");
  384. for(int pat=0;pat<nat.getLength();pat++){
  385. eat =(Element)nat.item(pat);
  386. AttSize.add(Parser.getValue(eat, "Size"));
  387. }
  388. }
  389. if(attjacket){
  390. nat=at.getElementsByTagName("Jacket");
  391. for(int pat=0;pat<nat.getLength();pat++){
  392. eat=(Element)nat.item(pat);
  393. AttJacket.add(Parser.getValue(eat, "Jacket"));
  394. }
  395.  
  396. }
  397. if(attjacketpantstyle){
  398. nat=at.getElementsByTagName("JacketPantStyle");
  399. for(int pat=0;pat<nat.getLength();pat++){
  400. eat=(Element)nat.item(pat);
  401. AttJacketPantStyle.add(Parser.getValue(eat, "JacketPantStyle"));
  402. }
  403.  
  404. }
  405. if(attnestedsuitsize){
  406. nat=at.getElementsByTagName("NestedSuitSize");
  407. for(int pat=0;pat<nat.getLength();pat++){
  408. eat=(Element)nat.item(pat);
  409. AttNestedSuitSize.add(Parser.getValue(eat, "NestedSuitSize"));
  410. }
  411. }
  412. if(attcolorsize){
  413. nat=at.getElementsByTagName("ColorSize");
  414. for(int pat=0;pat<nat.getLength();pat++){
  415. eat=(Element)nat.item(pat);
  416. AttColorSize.add(Parser.getValue(eat, "ColorSize"));
  417. }
  418.  
  419. }
  420. if(attwaist){
  421. nat=at.getElementsByTagName("Waist");
  422. for(int pat=0;pat<nat.getLength();pat++){
  423. eat=(Element)nat.item(pat);
  424. AttWaist.add(Parser.getValue(eat, "Waist"));
  425. }
  426.  
  427. }
  428. if(attfrontinseam){
  429. nat=at.getElementsByTagName("FrontInseam");
  430. for(int pat=0;pat<nat.getLength();pat++){
  431. eat=(Element)nat.item(pat);
  432. AttFrontInSeam.add(Parser.getValue(eat, "FrontInseam"));
  433. }
  434.  
  435. }
  436. if(attshirtsize){
  437. nat=at.getElementsByTagName("ShirtSize");
  438. for(int pat=0;pat<nat.getLength();pat++){
  439. eat=(Element)nat.item(pat);
  440. AttShirtSize.add(Parser.getValue(eat, "ShirtSize"));
  441. }
  442.  
  443. }
  444. if(attpantsize){
  445. nat=at.getElementsByTagName("PantSize");
  446. for(int pat=0;pat<nat.getLength();pat++){
  447. eat=(Element)nat.item(pat);
  448. AttPantSize.add(Parser.getValue(eat, "PantSize"));
  449. }
  450.  
  451. }
  452. if(attshirtcolor){
  453. nat=at.getElementsByTagName("ShirtColor");
  454. for(int pat=0;pat<nat.getLength();pat++){
  455. eat=(Element)nat.item(pat);
  456. AttShirtColor.add(Parser.getValue(eat, "ShirtColor"));
  457. }
  458.  
  459. }
  460. if(attpantcolor){
  461. nat=at.getElementsByTagName("PantColor");
  462. for(int pat=0;pat<nat.getLength();pat++){
  463. eat=(Element)nat.item(pat);
  464. AttPantColor.add(Parser.getValue(eat, "PantColor"));
  465. }
  466.  
  467. }
  468. if(attwaistinseam){
  469. nat=at.getElementsByTagName("WaistInseam");
  470. for(int pat=0;pat<nat.getLength();pat++){
  471. eat=(Element)nat.item(pat);
  472. AttWaistInSeam.add(Parser.getValue(eat, "WaistInseam"));
  473. }
  474.  
  475. }
  476. }
  477. }
  478. }
  479. NodeList im=e.getElementsByTagName("Images");
  480. for(int ima=0;ima<im.getLength();ima++){
  481. Element eim=(Element)im.item(ima);
  482. NodeList image=eim.getElementsByTagName("Image");
  483. for(int img=0;img<image.getLength();img++){
  484. Element eimg=(Element)image.item(img);
  485.  
  486. ImTitle.add(Parser.getValue(eimg, "Title"));
  487. ImURL.add(Parser.getValue(eimg, "Url"));
  488. }
  489. }
  490. break;
  491. }
  492. }
  493. }
  494. in=new Intent(forparse.this,Product_Info.class);
  495. in.putStringArrayListExtra("Name",(ArrayList<String>) Name);
  496. in.putStringArrayListExtra("ID",(ArrayList<String>) ID);
  497. in.putStringArrayListExtra("Description",(ArrayList<String>) Description);
  498. if(attribute){
  499. in.putExtra("Attribute", attribute);
  500. attribute=false;
  501. if(attcolor){
  502. in.putExtra("Colors", true);
  503. in.putStringArrayListExtra("Color",(ArrayList<String>)AttColor);
  504. attcolor=false;
  505. }else{
  506. in.putExtra("Colors",false);
  507. }
  508. if(attsize){
  509. in.putExtra("Sizes", true);
  510. in.putStringArrayListExtra("Size",(ArrayList<String>)AttSize);
  511. attsize=false;
  512. }else{
  513. in.putExtra("Sizes", false);
  514. }
  515. if(attjacket){
  516. in.putExtra("Jackets", true);
  517. in.putStringArrayListExtra("Jacket",(ArrayList<String>) AttJacket);
  518. attjacket=false;
  519. }else{
  520. in.putExtra("Jackets",false);
  521. }
  522. if(attjacketpantstyle){
  523. in.putExtra("JacketPantStyles", true);
  524. in.putStringArrayListExtra("JacketPantStyle",(ArrayList<String>)AttJacketPantStyle);
  525. attjacketpantstyle=false;
  526. }else{
  527. in.putExtra("JacketPantStyles", false);
  528. }
  529. if(attnestedsuitsize){
  530. in.putExtra("NestedSuitSizes", true);
  531. in.putStringArrayListExtra("NestedSuitSize",(ArrayList<String>)AttNestedSuitSize);
  532. attnestedsuitsize=false;
  533. }else{
  534. in.putExtra("NestedSuitSizes",false);
  535. }
  536. if(attcolorsize){
  537. in.putExtra("ColorSizes", true);
  538. in.putStringArrayListExtra("ColorSize",(ArrayList<String>)AttColorSize);
  539. attcolorsize=false;
  540. }else{
  541. in.putExtra("ColorSizes", false);
  542. }
  543. if(attwaist){
  544. in.putExtra("Waists", true);
  545. in.putStringArrayListExtra("Waist",(ArrayList<String>)AttWaist);
  546. attwaist=false;
  547. }else{
  548. in.putExtra("Waists", false);
  549. }
  550. if(attfrontinseam){
  551. in.putExtra("FrontInSeams", true);
  552. in.putStringArrayListExtra("FrontInSeam",(ArrayList<String>)AttFrontInSeam);
  553. attfrontinseam=false;
  554. }else{
  555. in.putExtra("FrontInSeams", false);
  556. }
  557. if(attshirtsize){
  558. in.putExtra("ShirtSizes", true);
  559. in.putStringArrayListExtra("ShirtSize",(ArrayList<String>)AttShirtSize);
  560. attshirtsize=false;
  561. }else{
  562. in.putExtra("ShirtSizes", false);
  563. }
  564. if(attpantsize){
  565. in.putExtra("PantSizes", true);
  566. in.putStringArrayListExtra("PantSize",(ArrayList<String>)AttPantSize);
  567. attpantsize=false;
  568. }else{
  569. in.putExtra("PantSizes", false);
  570. }
  571. if(attshirtcolor){
  572. in.putExtra("ShirtColors", true);
  573. in.putStringArrayListExtra("ShirtColor",(ArrayList<String>)AttShirtColor);
  574. attshirtcolor=false;
  575. }else{
  576. in.putExtra("ShirtColors",false);
  577. }
  578. if(attpantcolor){
  579. in.putExtra("PantColors", true);
  580. in.putStringArrayListExtra("PantColor",(ArrayList<String>)AttPantColor);
  581. attpantcolor=false;
  582. }else{
  583. in.putExtra("PantColors",false);
  584. }
  585. if(attwaistinseam){
  586. in.putExtra("WaistInSeams", true);
  587. in.putStringArrayListExtra("WaistInSeam",(ArrayList<String>)AttWaistInSeam);
  588. attwaistinseam=false;
  589. }else{
  590. in.putExtra("WaistInSeams",false);
  591. }
  592. }else{
  593. in.putExtra("Attribute",attribute);
  594. }
  595. in.putStringArrayListExtra("Title",(ArrayList<String>)ImTitle);
  596. in.putStringArrayListExtra("Url",(ArrayList<String>)ImURL);
  597. startActivity(in);
  598.  
  599. }
  600. }
  601.  
  602. }
  603.  
  604. }
Advertisement
Add Comment
Please, Sign In to add comment