@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setActionBarTitle("库存报警");

    setContentView(R.layout.container);
    PageListFragment frag = new PageListFragment("warning_product", R.layout.list_item_product);
    addContainerFragment(frag);
  }
Ejemplo n.º 2
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.forecast_page);
   super.onCreate(savedInstanceState);
   dataManager = AppLocator.resolve(IDataManager.class);
   checkIntent();
   initViews();
   initListeners();
 }
Ejemplo n.º 3
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.archive);

    createFileController();
    createFileOperationTasks();
    setupArchiveList();

    setBackgroundFromInitialOrientation();
  }
Ejemplo n.º 4
0
  @Override
  public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Intent serviceIntent = new Intent(this, NotifyService.class);
    this.startService(serviceIntent);

    orders = (GridView) findViewById(R.id.ordersList);

    orders.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Order order = (Order) parent.getAdapter().getItem(position);
            Intent intent = new Intent(ShopActivity.this, OrderDetailActivity.class);
            intent.putExtra(ORDER_EXTRA, order);
            startActivity(intent);
          }
        });

    ordersAdapter = new OrdersAdapter(this, ordersList);

    orders.setAdapter(ordersAdapter);

    getOrdersButton = (Button) findViewById(R.id.new_orders_button);

    getOrdersButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {

            v.setEnabled(false);

            loadOrders(true);
          }
        });

    loadOrders(false);
  }
Ejemplo n.º 5
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_contacts);

    findViewById(R.id.activity_contacts_add)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                showDetails(null);
              }
            });

    listAdapter = new ContactRowAdapter(this, R.layout.contact_row, null, FROM, TO, 0);

    ListView listView = ((ListView) findViewById(R.id.activity_contacts_list));
    listView.setAdapter(listAdapter);

    listView.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> l, View v, int p, long id) {
            if (WebData.Object.inConflict(listAdapter.getCursor())) {
              resolveConflict(p);
            } else {
              showDetails(p);
            }
          }
        });

    new SchemaManager(
            this,
            ContactContract.SCHEMA_ID,
            ((ContactsApplication) getApplication()).getUser(),
            this)
        .initSchema();
  }
Ejemplo n.º 6
0
 @Override
 public void onResume() {
   super.onResume();
   dataManager.getWeatherForecast(listener);
 }