@@ -0,0 +1,2740 @@
+package com.example.newstudent.barcode_v12;%0A%0Aimport android.app.Activity;%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.view.View;%0Aimport android.widget.Button;%0Aimport android.widget.CheckBox;%0Aimport android.widget.EditText;%0A%0Aimport static android.provider.AlarmClock.EXTRA_MESSAGE;%0A%0A/**%0A * Created by new student on 2/1/2017.%0A */%0A%0Apublic class Searching extends Activity  %7B%0A%0A    Button btnTombol1, btnTombol2, btnTombol3;%0A    EditText edtTulis1, edtTulis2;%0A%0A    private CheckBox ckpork, ck_emulsifier, ck_alcohol, ck_shortening, ck_gelatin, ck_margarin, ck_butter;%0A%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.searching);%0A%0A        btnTombol1 = (Button)findViewById(R.id.tombol1);%0A        btnTombol2 = (Button)findViewById(R.id.tombol2);%0A        btnTombol3 = (Button)findViewById(R.id.tombol3);%0A%0A        edtTulis1 = (EditText)findViewById(R.id.tulis1);%0A        edtTulis2 = (EditText)findViewById(R.id.tulis2);%0A%0A    %7D%0A%0A%0A    /** Called when the user clicks the search by checkboxes*/%0A    /*%0A    public void searchByCheckbox(View view) %7B%0A        Intent intent = new Intent(this, DisplayMessageActivity.class);%0A%0A%0A        ckpork = (CheckBox) findViewById(R.id.checkbox_pork);%0A        ck_emulsifier = (CheckBox) findViewById(R.id.checkbox_emulsifier);%0A        ck_alcohol = (CheckBox) findViewById(R.id.checkbox_alcohol);%0A        ck_shortening = (CheckBox) findViewById(R.id.checkbox_shortening);%0A        ck_gelatin = (CheckBox) findViewById(R.id.checkbox_gelatin);%0A        ck_margarin = (CheckBox) findViewById(R.id.checkbox_margarin);%0A        ck_butter = (CheckBox) findViewById(R.id.checkbox_butter);%0A%0A        StringBuffer result = new StringBuffer();%0A        result.append(%22alchohol= %22)%0A                .append(ck_alcohol.isChecked());%0A        result.append(%22 and pork= %22).append(%0A                ckpork.isChecked());%0A        result.append(%22 and emulsifier= %22).append(%0A                ck_emulsifier.isChecked());%0A        result.append(%22 and gelatin= %22).append(%0A                ck_gelatin.isChecked());%0A        result.append(%22 and margarin= %22).append(%0A                ck_margarin.isChecked());%0A        result.append(%22 and butter= %22).append(%0A                ck_butter.isChecked());%0A        result.append(%22 and shortening= %22).append(%0A                ck_shortening.isChecked());%0A        result.append(%22;%22);%0A%0A%0A        String query = result.toString();%0A        query = query.replaceAll(%22true%22, %22%5C%5C1%22);%0A        query = query.replaceAll(%22false%22, %22%5C%5C0%22);%0A%0A        String products = dbHelper.getProdcutByCategories(query);%0A%0A        intent.putExtra(EXTRA_MESSAGE, products);%0A        startActivity(intent);%0A    %7D%0A    */%0A%0A%0A%0A%7D%0A

Create Searching.java