示例#1
0
  public ProductListAdapter(Context context, List<Product> products) {
    super(context, R.layout.row_product_list);
    this.mContext = context;
    this.mProducts = products;
    imageLoader = new ImageLoader((Activity) mContext);
    mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    DataBase dbInstance = new DataBase(this.mContext);
    dbInstance.open();
    UserData userData = dbInstance.retrieveUserData();
    dbInstance.close();

    currency = userData.getCurrency();
    //        currency = ((StarfishApplication) ((Activity)
    // mContext).getApplication()).getUserData().getCurrency();
  }
示例#2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.new_reserve);

    webView = (WebView) findViewById(R.id.wv_extra);

    pDialog = new ProgressDialog(ReserveActivity.this, AlertDialog.THEME_TRADITIONAL);

    DataBase dbInstance = new DataBase(ReserveActivity.this);
    dbInstance.open();
    userData = dbInstance.retrieveUserData();
    dbInstance.close();

    //        userData = ((StarfishApplication)getApplication()).getUserData();
  }