Select Git revision
SingleView.java
SingleView.java 5.08 KiB
package com.example.srinivasan.database2;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.util.ArrayList;
import static android.R.attr.editTextStyle;
import static android.R.attr.handle;
public class SingleView extends AppCompatActivity implements View.OnClickListener{
DatabaseHelperTwo db2;
String[] date, time, query , locat;
TextView date1, time1, com1 ,location ,comments,typecom,butcom;
ProgressBar progressBar;
FloatingActionButton fab;
ProgressDialog progress;
private int progressStatus = 0;
private TextView textView;
PopupWindow popupWindow;
private Handler handler = new Handler();
SharedPreferences sharedpreferences;
public static final String MyPREFERENCES = "MyPrefs" ;
public static final String textsave = null;
int position;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_single_view);
db2 = new DatabaseHelperTwo(this);
date1 = (TextView) findViewById(R.id.textdate);
time1 = (TextView) findViewById(R.id.texttime);
com1 = (TextView) findViewById(R.id.comm);
location = (TextView)findViewById(R.id.location);
comments = (TextView)findViewById(R.id.comments);
typecom = (EditText)findViewById(R.id.typecom);
butcom = (Button)findViewById(R.id.butcom);
butcom.setOnClickListener(this);
// Get intent data
popupWindow = new PopupWindow(this);
Intent i = getIntent();
// Selected image id
position = i.getExtras().getInt("i");
//ImageAdapter imageAdapter = new ImageAdapter(this);
ArrayList<Bitmap> bitmapArray = new ArrayList<Bitmap>();
bitmapArray = db2.searchpass();
date = db2.dat();
time = db2.tim();
query = db2.com();
locat = db2.locat();
/*progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setOnClickListener(new View.OnClickListener() {
@Override