Guest User

Untitled

a guest
May 22nd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.61 KB | None | 0 0
  1. package com.opzet.pizzaria.opzet;
  2.  
  3. import android.app.Dialog;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.support.v7.app.AppCompatActivity;
  7. import android.support.v7.widget.LinearLayoutManager;
  8. import android.support.v7.widget.RecyclerView;
  9. import android.text.Editable;
  10. import android.text.TextWatcher;
  11. import android.view.View;
  12. import android.view.Window;
  13. import android.widget.Button;
  14. import android.widget.EditText;
  15.  
  16. import java.util.ArrayList;
  17.  
  18. public class Menu extends AppCompatActivity implements ExampleAdapter.OnItemClickListner{
  19. private ArrayList<ExampleItem> mExampleList;
  20.  
  21. public static final String GERECHT = "ImageView";
  22. public static final String EXTRA_URL = "Text1";
  23. public static final String EXTRA_CREATOR = "Text2";
  24. public static final String EXTRA_LIKES = "Text3";
  25.  
  26.  
  27.  
  28.  
  29. private RecyclerView mRecyclerView;
  30.  
  31. private ExampleAdapter mAdapter;
  32. private RecyclerView.LayoutManager mLayoutManager;
  33.  
  34. Button show;
  35.  
  36.  
  37.  
  38. Dialog MyDialog;
  39. Button close,kinder,voor,salades,soepen,diversen,pasta,alles,pizza,penette,ravioli,oven,rijst,vlees,vis,afronden;
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. @Override
  77. protected void onCreate(Bundle savedInstanceState) {
  78. super.onCreate(savedInstanceState);
  79. setContentView(R.layout.activity_menu);
  80.  
  81.  
  82.  
  83.  
  84.  
  85. show = (Button)findViewById(R.id.show);
  86. show.setOnClickListener(new View.OnClickListener()
  87. {
  88. @Override
  89. public void onClick(View view){
  90. MyCustomAlertDialog();
  91.  
  92. }
  93.  
  94.  
  95. });
  96.  
  97.  
  98. afronden = (Button)findViewById(R.id.afronden);
  99. afronden.setOnClickListener(new View.OnClickListener() {
  100. @Override
  101. public void onClick(View v) {
  102. openAfronden();
  103. }
  104. });
  105.  
  106.  
  107.  
  108. createExampleList();
  109.  
  110.  
  111. EditText editText = findViewById(R.id.edittext);
  112. editText.addTextChangedListener(new TextWatcher() {
  113. @Override
  114. public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  115.  
  116. }
  117.  
  118. @Override
  119. public void onTextChanged(CharSequence s, int start, int before, int count) {
  120.  
  121. }
  122.  
  123. @Override
  124. public void afterTextChanged(Editable s) {
  125. filter(s.toString());
  126. }
  127. });
  128.  
  129. }
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. private void filter(String text) {
  167. ArrayList<ExampleItem> filteredList = new ArrayList<>();
  168.  
  169. for (ExampleItem item : mExampleList) {
  170. if (item.getText1().toLowerCase().contains(text.toLowerCase())) {
  171. filteredList.add(item);
  172. }
  173. }
  174.  
  175. for (ExampleItem item : mExampleList) {
  176. if (item.getText3().toLowerCase().contains(text.toLowerCase())) {
  177. filteredList.add(item);
  178. }
  179. }
  180.  
  181. for (ExampleItem item : mExampleList) {
  182. if (item.getText2().toLowerCase().contains(text.toLowerCase())) {
  183. filteredList.add(item);
  184. }
  185. }
  186.  
  187.  
  188.  
  189.  
  190.  
  191. mAdapter.filterList(filteredList);
  192. }
  193.  
  194.  
  195.  
  196.  
  197.  
  198. private void createExampleList() {
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. mExampleList = new ArrayList<>();
  221.  
  222.  
  223.  
  224. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Asterix", "€7,00", "Tomatensaus, kaas en ananas"));
  225. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Obelix", "€7,00", "Tomatensaus, kaas en jam"));
  226. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  227.  
  228. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  229.  
  230. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  231.  
  232. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  233.  
  234. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  235.  
  236. mExampleList.add(new ExampleItem(R.drawable.fotogerecht, "Pizza Idefix", "€7,50", "Tomatensaus, kaas, ham en ananas"));
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. mRecyclerView =
  250.  
  251. findViewById(R.id.recyclerView);
  252. mRecyclerView.setHasFixedSize(true);
  253. mLayoutManager = new LinearLayoutManager(this);
  254.  
  255. mAdapter = new ExampleAdapter(mExampleList);
  256.  
  257. mRecyclerView.setLayoutManager(mLayoutManager);
  258. mRecyclerView.setAdapter(mAdapter);
  259.  
  260. }
  261.  
  262.  
  263.  
  264. public void MyCustomAlertDialog(){
  265. MyDialog = new Dialog(Menu.this);
  266. MyDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  267. MyDialog.setContentView(R.layout.customdialog);
  268. MyDialog.setTitle("My Custom Dialog");
  269.  
  270. soepen = MyDialog.findViewById(R.id.soepen);
  271. close = MyDialog.findViewById(R.id.close);
  272. kinder = MyDialog.findViewById(R.id.kinder);
  273. voor = MyDialog.findViewById(R.id.voor);
  274. salades = MyDialog.findViewById(R.id.salades);
  275. diversen = MyDialog.findViewById(R.id.diversen);
  276. pasta = MyDialog.findViewById(R.id.pasta);
  277. alles = MyDialog.findViewById(R.id.alles);
  278. pizza = MyDialog.findViewById(R.id.pizza);
  279. penette = MyDialog.findViewById(R.id.pennette);
  280. ravioli = MyDialog.findViewById(R.id.ravioli);
  281. oven = MyDialog.findViewById(R.id.oven);
  282. rijst = MyDialog.findViewById(R.id.rijst);
  283. vlees = MyDialog.findViewById(R.id.vlees);
  284. vis = MyDialog.findViewById(R.id.vis);
  285.  
  286.  
  287. soepen.setEnabled(true);
  288. close.setEnabled(true);
  289. kinder.setEnabled(true);
  290. voor.setEnabled(true);
  291. salades.setEnabled(true);
  292. diversen.setEnabled(true);
  293. pasta.setEnabled(true);
  294. alles.setEnabled(true);
  295. pizza.setEnabled(true);
  296. penette.setEnabled(true);
  297. ravioli.setEnabled(true);
  298. oven.setEnabled(true);
  299. rijst.setEnabled(true);
  300. vlees.setEnabled(true);
  301. vis.setEnabled(true);
  302.  
  303.  
  304. soepen.setOnClickListener(new View.OnClickListener() {
  305. @Override
  306. public void onClick(View v) {
  307. openSoepen();
  308. }
  309. });
  310. close.setOnClickListener(new View.OnClickListener() {
  311. @Override
  312. public void onClick(View v) {
  313. MyDialog.cancel();
  314. }
  315. });
  316.  
  317. kinder.setOnClickListener(new View.OnClickListener() {
  318. @Override
  319. public void onClick(View v) {
  320. openKinder();
  321. }
  322. });
  323.  
  324. voor.setOnClickListener(new View.OnClickListener() {
  325. @Override
  326. public void onClick(View v) {
  327. openVoor();
  328. }
  329. });
  330.  
  331. salades.setOnClickListener(new View.OnClickListener() {
  332. @Override
  333. public void onClick(View v) {
  334. openKinder();
  335. }
  336. });
  337.  
  338. diversen.setOnClickListener(new View.OnClickListener() {
  339. @Override
  340. public void onClick(View v) {
  341. openDiversen();
  342. }
  343. });
  344.  
  345. pasta.setOnClickListener(new View.OnClickListener() {
  346. @Override
  347. public void onClick(View v) {
  348. openPasta();
  349. }
  350. });
  351.  
  352. salades.setOnClickListener(new View.OnClickListener() {
  353. @Override
  354. public void onClick(View v) {
  355. openSalades();
  356. }
  357. });
  358.  
  359.  
  360.  
  361.  
  362. alles.setOnClickListener(new View.OnClickListener() {
  363. @Override
  364. public void onClick(View v) {
  365. openAlles();
  366. }
  367. });
  368.  
  369. pizza.setOnClickListener(new View.OnClickListener() {
  370. @Override
  371. public void onClick(View v) {
  372. openPizza();
  373. }
  374. });
  375.  
  376. penette.setOnClickListener(new View.OnClickListener() {
  377. @Override
  378. public void onClick(View v) {
  379. openPenette();
  380. }
  381. });
  382.  
  383. ravioli.setOnClickListener(new View.OnClickListener() {
  384. @Override
  385. public void onClick(View v) {
  386. openRavioli();
  387. }
  388. });
  389.  
  390. oven.setOnClickListener(new View.OnClickListener() {
  391. @Override
  392. public void onClick(View v) {
  393. openOven();
  394. }
  395. });
  396.  
  397. rijst.setOnClickListener(new View.OnClickListener() {
  398. @Override
  399. public void onClick(View v) {
  400. openRijst();
  401. }
  402. });
  403.  
  404.  
  405. vlees.setOnClickListener(new View.OnClickListener() {
  406. @Override
  407. public void onClick(View v) {
  408. openVlees();
  409. }
  410. });
  411.  
  412. vis.setOnClickListener(new View.OnClickListener() {
  413. @Override
  414. public void onClick(View v) {
  415. openVis();
  416. }
  417. });
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451. MyDialog.show();
  452. }
  453.  
  454.  
  455.  
  456.  
  457.  
  458. public void openKinder() {
  459. Intent intent = new Intent(this, Kinder.class);
  460. startActivity(intent);
  461. }
  462.  
  463. public void openVoor() {
  464. Intent intent = new Intent(this, Voor.class);
  465. startActivity(intent);
  466. }
  467.  
  468. public void openSoepen() {
  469. Intent intent = new Intent(this, Soepen.class);
  470. startActivity(intent);
  471. }
  472.  
  473. public void openDiversen() {
  474. Intent intent = new Intent(this, Diversen.class);
  475. startActivity(intent);
  476. }
  477.  
  478. public void openPasta() {
  479. Intent intent = new Intent(this, Pasta.class);
  480. startActivity(intent);
  481. }
  482.  
  483. public void openSalades() {
  484. Intent intent = new Intent(this, Pasta.class);
  485. startActivity(intent);
  486. }
  487.  
  488.  
  489. public void openAlles() {
  490. Intent intent = new Intent(this, Menu.class);
  491. startActivity(intent);
  492. }
  493.  
  494.  
  495. public void openPizza() {
  496. Intent intent = new Intent(this, pizza.class);
  497. startActivity(intent);
  498. }
  499.  
  500.  
  501.  
  502. public void openPenette() {
  503. Intent intent = new Intent(this, penette.class);
  504. startActivity(intent);
  505. }
  506.  
  507. public void openRavioli() {
  508. Intent intent = new Intent(this, ravioli.class);
  509. startActivity(intent);
  510. }
  511.  
  512. public void openRijst() {
  513. Intent intent = new Intent(this, rijst.class);
  514. startActivity(intent);
  515. }
  516.  
  517. public void openVlees() {
  518. Intent intent = new Intent(this, vlees.class);
  519. startActivity(intent);
  520. }
  521.  
  522. public void openVis() {
  523. Intent intent = new Intent(this, vis.class);
  524. startActivity(intent);
  525. }
  526.  
  527. public void openOven() {
  528. Intent intent = new Intent(this, oven.class);
  529. startActivity(intent);
  530. }
  531.  
  532.  
  533. public void openAfronden() {
  534. Intent intent = new Intent(this, bestelling.class);
  535. startActivity(intent);
  536. }
  537.  
  538.  
  539. @Override
  540. public void onItemClick(int position) {
  541. Intent detailIntent = new Intent(this, POPUP.class);
  542. ExampleItem clickedItem = mExampleList.get(position);
  543.  
  544. detailIntent.putExtra(EXTRA_URL, clickedItem.getText1());
  545. detailIntent.putExtra(EXTRA_CREATOR, clickedItem.getText2());
  546. detailIntent.putExtra(EXTRA_LIKES, clickedItem.getText3());
  547. detailIntent.putExtra(GERECHT, clickedItem.getImageResource());
  548.  
  549.  
  550. }
  551. }
  552.  
  553. package com.opzet.pizzaria.opzet;
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560. public class ExampleItem {
  561. private int mImageResource;
  562. private String mText1;
  563. private String mText2;
  564. private String mText3;
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575. public ExampleItem(int imageResource, String text1, String text2, String
  576. text3) {
  577. mImageResource = imageResource;
  578.  
  579. mText1 = text1;
  580. mText2 = text2;
  581. mText3 = text3;
  582.  
  583.  
  584. }
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. public int getImageResource() {
  601. return mImageResource;
  602. }
  603.  
  604. public String getText1() {
  605. return mText1;
  606. }
  607.  
  608. public String getText2() {
  609. return mText2;
  610. }
  611.  
  612. public String getText3() {
  613. return mText3;
  614. }
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644. }
  645.  
  646. package com.opzet.pizzaria.opzet;
  647.  
  648. import android.support.v7.widget.RecyclerView;
  649. import android.view.LayoutInflater;
  650. import android.view.View;
  651. import android.view.ViewGroup;
  652. import android.widget.ImageView;
  653. import android.widget.TextView;
  654.  
  655. import java.util.ArrayList;
  656.  
  657.  
  658. public class ExampleAdapter extends
  659. RecyclerView.Adapter<ExampleAdapter.ExampleViewHolder> {
  660. private ArrayList<ExampleItem> mExampleList;
  661. private OnItemClickListner mListner;
  662.  
  663. public interface OnItemClickListner{
  664. void onItemClick(int position);
  665. }
  666.  
  667.  
  668. public void SetOnItemClickListner(OnItemClickListner listner) {
  669. mListner = listner;
  670. }
  671.  
  672.  
  673. public class ExampleViewHolder extends RecyclerView.ViewHolder {
  674. public ImageView mImageView;
  675. public TextView mTextView1;
  676. public TextView mTextView2;
  677. public TextView mTextView3;
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685. public ExampleViewHolder(View itemView, final OnItemClickListner listner) {
  686. super(itemView);
  687. mImageView = itemView.findViewById(R.id.imageView);
  688. mTextView1 = itemView.findViewById(R.id.textView);
  689. mTextView2 = itemView.findViewById(R.id.textView2);
  690. mTextView3 = itemView.findViewById(R.id.textView3);
  691.  
  692. itemView.setOnClickListener(new View.OnClickListener(){
  693. @Override
  694. public void onClick(View view) {
  695. if(mListner != null) {
  696. int position = getAdapterPosition();
  697. if (position != RecyclerView.NO_POSITION){
  698. listner.onItemClick(position);
  699. }
  700. }
  701. }
  702.  
  703. });
  704.  
  705.  
  706.  
  707. }
  708. }
  709.  
  710. public ExampleAdapter(ArrayList<ExampleItem> exampleList) {
  711. mExampleList = exampleList;
  712. }
  713.  
  714.  
  715.  
  716.  
  717.  
  718. @Override
  719. public ExampleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  720. View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.example_item,
  721. parent, false);
  722. ExampleViewHolder evh = new ExampleViewHolder(v, mListner);
  723. return evh;
  724.  
  725.  
  726.  
  727.  
  728.  
  729. }
  730.  
  731. @Override
  732. public void onBindViewHolder(ExampleViewHolder holder, int position) {
  733. ExampleItem currentItem = mExampleList.get(position);
  734.  
  735.  
  736.  
  737. holder.mImageView.setImageResource(currentItem.getImageResource());
  738. holder.mTextView1.setText(currentItem.getText1());
  739. holder.mTextView2.setText(currentItem.getText2());
  740. holder.mTextView3.setText(currentItem.getText3());
  741.  
  742.  
  743.  
  744.  
  745.  
  746. }
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755. @Override
  756. public int getItemCount() {
  757. return mExampleList.size();
  758. }
  759.  
  760.  
  761.  
  762.  
  763.  
  764. public void filterList(ArrayList<ExampleItem> filteredList) {
  765. mExampleList = filteredList;
  766. notifyDataSetChanged();
  767. }
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774. }
  775.  
  776. <?xml version="1.0" encoding="utf-8"?>
  777. <RelativeLayout
  778. xmlns:android="http://schemas.android.com/apk/res/android"
  779. xmlns:app="http://schemas.android.com/apk/res-auto"
  780. xmlns:tools="http://schemas.android.com/tools"
  781. android:layout_width="match_parent"
  782. android:layout_height="match_parent"
  783. tools:context="com.opzet.pizzaria.opzet.MainActivity"
  784. android:focusable="true"
  785.  
  786. android:focusableInTouchMode="true"
  787. >
  788. <ImageButton
  789. android:id="@+id/imageButton2"
  790. android:layout_width="wrap_content"
  791. android:layout_height="wrap_content"
  792. app:srcCompat="@drawable/background"
  793. android:layout_alignParentTop="true"
  794. android:layout_alignParentStart="true" />
  795.  
  796. <ImageView
  797. android:id="@+id/boven"
  798. android:layout_width="180dp"
  799. android:layout_height="wrap_content"
  800. app:srcCompat="@drawable/rechthoekboven"
  801. tools:layout_editor_absoluteX="210dp"
  802. tools:layout_editor_absoluteY="0dp"
  803. android:layout_alignParentTop="true"
  804. android:layout_centerHorizontal="true" />
  805.  
  806. <TextView
  807. android:id="@+id/textView2"
  808. android:layout_width="wrap_content"
  809. android:layout_height="wrap_content"
  810. android:layout_gravity="center_horizontal"
  811. android:text="@string/Menukaart"
  812. android:textColor="#FFFFFF"
  813. android:textSize="21sp"
  814. android:textStyle="italic"
  815. tools:layout_editor_absoluteX="240dp"
  816. tools:layout_editor_absoluteY="32dp"
  817. android:layout_above="@+id/sorteerbalk"
  818. android:layout_centerHorizontal="true"
  819. android:layout_marginBottom="32dp" />
  820.  
  821. <ImageView
  822. android:id="@+id/sorteerbalk"
  823. android:layout_width="280dp"
  824. android:layout_height="100dp"
  825. android:layout_gravity="center_horizontal"
  826. app:srcCompat="@drawable/sorteerbalk"
  827. tools:layout_editor_absoluteX="160dp"
  828. tools:layout_editor_absoluteY="84dp"
  829. android:layout_below="@+id/boven"
  830. android:layout_centerHorizontal="true" />
  831.  
  832. <ImageView
  833. android:id="@+id/zoekbalk"
  834. android:layout_width="280dp"
  835. android:layout_height="100dp"
  836. android:layout_gravity="center_horizontal"
  837. app:srcCompat="@drawable/zoekbalk"
  838. tools:layout_editor_absoluteX="160dp"
  839. tools:layout_editor_absoluteY="50dp"
  840. android:layout_alignTop="@+id/textView2"
  841. android:layout_alignLeft="@+id/sorteerbalk"
  842. android:layout_alignStart="@+id/sorteerbalk"
  843. android:layout_marginTop="17dp" />
  844.  
  845. <TextView
  846. android:id="@+id/textView3"
  847. android:layout_width="wrap_content"
  848. android:layout_height="20dp"
  849. android:layout_alignBottom="@+id/zoekbalk"
  850. android:layout_centerHorizontal="true"
  851. android:layout_gravity="center_horizontal"
  852. android:text="@string/sorteren"
  853. android:textColor="#000000"
  854. android:textSize="15sp"
  855. android:textStyle="italic"
  856. tools:layout_editor_absoluteX="240dp"
  857. tools:layout_editor_absoluteY="32dp" />
  858.  
  859.  
  860. <EditText
  861. android:id="@+id/edittext"
  862. android:layout_width="220dp"
  863. android:layout_height="40dp"
  864. android:layout_above="@+id/textView3"
  865. android:layout_centerHorizontal="true"
  866. android:layout_marginBottom="11dp"
  867. android:textAlignment="center"
  868. android:hint="Zoeken..."/>
  869.  
  870. <android.support.v7.widget.RecyclerView
  871. android:id="@+id/recyclerView"
  872. android:layout_width="match_parent"
  873. android:layout_height="match_parent"
  874. android:padding="4dp"
  875. android:layout_below="@+id/sorteerbalk"
  876. android:layout_alignParentStart="true" >
  877.  
  878. </android.support.v7.widget.RecyclerView>
  879.  
  880. <Button
  881. android:id="@+id/show"
  882. android:layout_width="260dp"
  883. android:layout_height="45dp"
  884. android:layout_alignBaseline="@+id/textView3"
  885. android:layout_alignBottom="@+id/textView3"
  886. android:layout_centerHorizontal="true"
  887. android:text="Button"
  888. android:alpha="0"/>
  889.  
  890. <ImageView
  891. android:id="@+id/imageView9"
  892. android:layout_width="50dp"
  893. android:layout_height="90dp"
  894. android:layout_above="@+id/sorteerbalk"
  895. android:layout_alignParentEnd="true"
  896. android:layout_marginEnd="32dp"
  897. app:srcCompat="@drawable/bestelling" />
  898.  
  899. <Button
  900. android:id="@+id/afronden"
  901. android:layout_width="50dp"
  902. android:layout_height="90dp"
  903. android:text="Button"
  904. android:layout_alignParentTop="true"
  905. android:layout_alignStart="@+id/imageView9"
  906. android:alpha="0"/>
  907.  
  908.  
  909. </RelativeLayout>
  910.  
  911. <?xml version="1.0" encoding="utf-8"?>
  912. <android.support.v7.widget.CardView
  913. xmlns:android="http://schemas.android.com/apk/res/android"
  914. android:layout_width="match_parent"
  915. android:layout_height="wrap_content"
  916. xmlns:app="http://schemas.android.com/apk/res-auto"
  917. app:cardCornerRadius="4dp"
  918. android:padding="0dp"
  919. android:layout_margin="4dp">
  920.  
  921.  
  922. <RelativeLayout
  923. android:layout_width="match_parent"
  924. android:layout_height="match_parent"
  925. android:layout_margin="4dp"
  926. android:padding="4dp">
  927.  
  928.  
  929. <ImageView
  930. android:id="@+id/imageView"
  931. android:layout_width="120dp"
  932. android:layout_height="120dp"
  933. android:padding="2dp" />
  934.  
  935. <TextView
  936. android:id="@+id/textView"
  937. android:layout_width="wrap_content"
  938. android:layout_height="wrap_content"
  939. android:layout_marginLeft="130dp"
  940. android:layout_marginTop="0dp"
  941. android:text="Line 1"
  942.  
  943. android:textSize="20sp"
  944. android:textStyle="bold|italic" />
  945.  
  946. <TextView
  947. android:id="@+id/textView2"
  948. android:layout_width="wrap_content"
  949. android:layout_height="wrap_content"
  950. android:layout_marginLeft="130dp"
  951. android:layout_marginTop="100dp"
  952. android:text="Line 2"
  953. android:textSize="15sp"
  954. android:textStyle="bold" />
  955.  
  956. <TextView
  957. android:id="@+id/textView3"
  958. android:layout_width="wrap_content"
  959. android:layout_height="wrap_content"
  960. android:layout_centerVertical="true"
  961.  
  962. android:layout_marginLeft="130dp"
  963. android:text="Line 3"
  964. android:textStyle="bold" />
  965.  
  966. <ImageView
  967. android:id="@+id/imageADD"
  968. android:layout_width="25dp"
  969. android:layout_height="25dp"
  970. android:layout_alignBottom="@+id/textView2"
  971. android:layout_alignParentEnd="true"
  972. app:srcCompat="@drawable/add" />
  973.  
  974. <Button
  975. android:id="@+id/addbutton"
  976. android:layout_width="25dp"
  977. android:layout_height="25dp"
  978. android:text="Button"
  979. android:layout_alignTop="@+id/imageADD"
  980. android:layout_alignParentEnd="true"
  981. android:alpha="0"/>
  982.  
  983.  
  984. </RelativeLayout>
  985.  
  986.  
  987. </android.support.v7.widget.CardView>
Add Comment
Please, Sign In to add comment