Android Open Source - android-webview-example Index Activity






From Project

Back to project page android-webview-example.

License

The source code is released under:

Apache License

If you think the Android project android-webview-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.significantfiles.mrcounter;
/* ww w  . j  av  a2 s.co m*/


/**
 * Wie arbeitet man mit Datenbanken unter Android?
 * 
 * http://www.higherpass.com/Android/Tutorials/Accessing-Data-With-Android-Cursors/
 * @author asiebert
 *
 */
// https://freekeywords.wordtracker.com/searches/loveletter%20app?adult=1
public class IndexActivity {
  
//
//extends Activity {
//
//  private static final int PICK_CONTACT = 3;
//
//  /** Called when the activity is first created. */
//  @Override
//  public void onCreate(Bundle savedInstanceState) {
//    final Window window = getWindow();
//    window.setFormat(PixelFormat.RGBA_8888);
//    super.onCreate(savedInstanceState);
//
//    setContentView(R.layout.main);
//
//    prepareContactView();
//    prepareValueView();
//    prepareSaveCreditButton();
//    // search provider widget
//    // create credit contract
//    // credit-request
//  }
//
//  private void prepareSaveCreditButton() {
//    final Button view = (Button) this.findViewById(R.id.credit);
//    
//    view.setOnTouchListener( new View.OnTouchListener() {
//
//      @Override
//      public boolean onTouch(final View arg0, final MotionEvent arg1) {
//        final ContentValues values = new ContentValues();
//        
//        ContentResolverUtil.insert(getContentResolver(), Uris.INSERT_CREDIT, values);
//        
//        launchCreditListActivity();
//        return true;
//      }
//      
//      protected void launchCreditListActivity() {
//            final Intent i = new Intent(IndexActivity.this, ManageCreditsActivity.class);
//            
//            try {
//              startActivity(i);
//            } catch (final Throwable e) {
//          // TODO: handle exception
//              System.out.println(e);
//        }
//        }
//    });
//    
////    view.setOnClickListener( new View.OnClickListener() {
////      
////      @Override
////      public void onClick(View v) {
////        final ContentValues values = new ContentValues();
////        
////        ContentResolverUtil.insert(getContentResolver(), Uris.INSERT_CREDIT, values);  
////        
////        launchCreditListActivity();
////      }
////      
////      protected void launchCreditListActivity() {
////            final Intent i = new Intent(IndexActivity.this, CreditsListActivity.class);
////            startActivity(i);
////        }
////    });
//      
//  }
//
//  // @Override
//  // public void onAttachedToWindow() {
//  // super.onAttachedToWindow();
//  //
//  // }
//
//  private void prepareValueView() {
//    // TODO Auto-generated method stub
//  }
//
//  private void prepareContactView() {
//    View view = this.findViewById(R.id.contact);
//    final EditText contactView = (EditText) view;
//
//    if (contactView == null) {
//      System.out.println("<<<ERROR:>>> " + contactView);
//      return;
//    }
//
//    contactView.setFocusable(true);
//
//    contactView.setOnTouchListener(new View.OnTouchListener() {
//
//      // private
//
//      @Override
//      public boolean onTouch(View v, MotionEvent event) {
//        // final Cursor cursor = getContacts();
//        // while (cursor.moveToNext()) {
//        // DatabaseUtils.dumpCurrentRow(cursor);
//        // }
//        //
//        // // TODO Auto-generated method stub
//        // return true;
//
//        // event nicht direkt behandeln (zu schnelle clicks.)
//        long eventTime = event.getEventTime();
//
//        final Uri uri = People.CONTENT_URI;
//        final Intent intent = new Intent(Intent.ACTION_PICK, uri);
//        startActivityForResult(intent, PICK_CONTACT);
//        
//
//        return true;
//      }
//    });
//  }
//
//  @Override
//  public void onActivityResult(int reqCode, int resultCode, Intent data) {
//    super.onActivityResult(reqCode, resultCode, data);
//
//    switch (reqCode) {
//    case (PICK_CONTACT):
//      if (resultCode == Activity.RESULT_OK) {
//        Uri contactData = data.getData();
//        Cursor c = managedQuery(contactData, null, null, null, null);
//        //
//        if (c.moveToFirst()) {
//          // // other data is available for the Contact. I have
//          // decided
//          // // to only get the name of the Contact.
//          final int columnIdx = c
//              .getColumnIndexOrThrow(People.DISPLAY_NAME);
//          String name = c.getString(columnIdx);
//
//          View view = this.findViewById(R.id.contact);
//          final EditText contactView = (EditText) view;
//
//          // TODO: store into credit-db
//          // credit-reminder
//          contactView.setText(name);
//        }
//      }
//    }
//
//  }
//
//  private Cursor getContacts() {
//    // Run query
//    final Uri uri = Contacts.CONTENT_URI;
//    final String[] projection = new String[] { ContactMethods._ID,
//        ContactMethods.DISPLAY_NAME };
//    final String selection = ContactMethods.DISPLAY_NAME + " <> 'Andrej'";
//    String[] selectionArgs = null;
//    String sortOrder = ContactMethods.DISPLAY_NAME
//        + " COLLATE LOCALIZED ASC";
//
//    return managedQuery(uri, projection, selection, selectionArgs,
//        sortOrder);
//  }

}




Java Source Code List

com.significantfiles.android.db.CommandUriMatcherTestCase.java
com.significantfiles.android.db.CreditContentProviderTestCase.java
com.significantfiles.android.db.SQLiteCreateTableTestCase.java
com.significantfiles.android.db.SimpleProviderTestCase.java
com.significantfiles.android.db.TestCommandBasedContentProvider.java
com.significantfiles.android.provider.table.Authority.java
com.significantfiles.android.provider.table.ColumnMethodEnumeration.java
com.significantfiles.android.provider.table.OrderBy.java
com.significantfiles.android.provider.table.SQLiteField.java
com.significantfiles.android.provider.table.SQLiteTable.java
com.significantfiles.android.provider.table.SQLiteType.java
com.significantfiles.android.provider.table.UriPathExt.java
com.significantfiles.android.provider.table.constraint.IsPrimaryKey.java
com.significantfiles.android.provider.table.constraint.NotNull.java
com.significantfiles.android.provider.table.constraint.Unique.java
com.significantfiles.android.sqlite.DaoInvocationHandler.java
com.significantfiles.android.sqlite.GET.java
com.significantfiles.android.sqlite.InsertException.java
com.significantfiles.android.sqlite.UnsupportedUri.java
com.significantfiles.android.sqlite.commands.CommandBasedContentProvider.java
com.significantfiles.android.sqlite.commands.CreateTable.java
com.significantfiles.android.sqlite.commands.DaoManager.java
com.significantfiles.android.sqlite.commands.InsertCmd.java
com.significantfiles.android.sqlite.commands.InsertRow.java
com.significantfiles.android.sqlite.create.ColumnExtractor.java
com.significantfiles.android.sqlite.create.TableExtractor.java
com.significantfiles.android.sqlite.query.InsertTxChoice.java
com.significantfiles.android.sqlite.query.Insert.java
com.significantfiles.android.sqlite.query.QueryType.java
com.significantfiles.android.sqlite.query.Replace.java
com.significantfiles.android.sqlite.query.SQL.java
com.significantfiles.android.sqlite.types.BLOB.java
com.significantfiles.android.sqlite.types.ID.java
com.significantfiles.android.sqlite.types.INTEGER.java
com.significantfiles.android.sqlite.types.REAL.java
com.significantfiles.android.sqlite.types.TEXT.java
com.significantfiles.mrcounter.ActivityRequestCode.java
com.significantfiles.mrcounter.Constants.java
com.significantfiles.mrcounter.IndexActivity.java
com.significantfiles.mrcounter.StartActivity.java
com.significantfiles.mrcounter.WebChromeClient.java
com.significantfiles.mrcounter.WebViewClient.java
com.significantfiles.mrcounter.db.CommandUriMatcher.java
com.significantfiles.mrcounter.db.ContentProviderCmd.java
com.significantfiles.mrcounter.db.ContentResolverUtil.java
com.significantfiles.mrcounter.db.ContentValuesKeys.java
com.significantfiles.mrcounter.db.CreditByIdResult.java
com.significantfiles.mrcounter.db.CreditDao.java
com.significantfiles.mrcounter.db.CreditQuery.java
com.significantfiles.mrcounter.db.CreditSQLiteOpenHelper.java
com.significantfiles.mrcounter.db.Credit.java
com.significantfiles.mrcounter.db.Credits.java
com.significantfiles.mrcounter.db.DaoConfig.java
com.significantfiles.mrcounter.db.InsertCreditCmd.java
com.significantfiles.mrcounter.db.UnknownQueryTypeException.java
com.significantfiles.mrcounter.db.Uris.java
com.significantfiles.mrcounter.db.provider.CommandBasedCreditContentProvider.java
com.significantfiles.mrcounter.db.provider.CreditContentProvider.java
com.significantfiles.mrcounter.db.provider.CreditDaoBasedContentProvider.java
com.significantfiles.mrcounter.db.result.Converter.java
com.significantfiles.mrcounter.db.result.Credit.java
com.significantfiles.mrcounter.db.result.DefaultConverterStrategy.java
com.significantfiles.mrcounter.db.result.DefautInteger2IntConverter.java
com.significantfiles.mrcounter.db.result.QueryRef.java
com.significantfiles.mrcounter.js.CreateCreditControl.java
com.significantfiles.mrcounter.js.WebViewFacade.java