Coder Social home page Coder Social logo

databasemanager_for_android's People

Contributors

abdellahbenhammou avatar intrications avatar sanathp avatar sivakumar-raja avatar thomasfischersm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

databasemanager_for_android's Issues

Blob

This was very helpful for me to see what was happening inside my database. However, the application crashes when I click on my database from inside your activity after I store a blob (in my case a byte array from bitmap) in the database.

Color scheme doesn't work within Holo.Light theme

Hey, thanks for writing this. It's simple and crude but just fine for my project.

I would, however, suggest you not hardcode colors, especially Color.WHITE, as that makes your text invisible within applications that use the Holo.Light theme.

In my copy of AndroidDatabaseManager.java, I've deleted all the hardcoded colors (except for a few
REDs). That has made things better, but one oddity remains, and that is that the text for the values of database rows (what I see when I "click on the row below to update values or delete the tuple") is still invisible. I don't know why that is, but a hack that works is to grab the color of some text that is good, and force the (otherwise) invisible text to take on that color.

getActivity()

While inserting a button, I get the issue that "Cannot resolve method getActivity()". Can someone tell me how to resolve this?

Something with view

This is what I see:
screenshot_2014-11-04-15-29-49

I can click on the dropdown menu's, but I don't see them.

I use androidannotation in my project, may be this could be the reason.. buy I don't think so

Close soft keyboard upon executing SQL query or tapping elsewhere

It would be nice if you could auto-dismiss the soft keyboard when the user clicks "Submit Query" or if they tap anywhere that is not a textView.

This code can be used:

public void setUpHideKeyboardListeners(View view) {

    //Set up touch listener for non-text box views to hide keyboard.
    if(!(view instanceof EditText)) {

        view.setOnTouchListener(new View.OnTouchListener() {

            public boolean onTouch(View v, MotionEvent event) {
                hideSoftKeyboard(VoiceFragment.this.getActivity());
                return false;
            }

        });
    }

    //If a layout container, iterate over children and seed recursion.
    if (view instanceof ViewGroup) {

        for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {

            View innerView = ((ViewGroup) view).getChildAt(i);

            setUpHideKeyboardListeners(innerView);
        }
    }
}

Called as

setUpHideKeyboardListeners(view);

in OnCreateView();

To programmatically hide the keyboard:

public static void hideSoftKeyboard(Activity activity) {
    View currentFocusView = activity.getCurrentFocus();
    if (currentFocusView != null) {
        InputMethodManager inputMethodManager = (InputMethodManager)  activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
        inputMethodManager.hideSoftInputFromWindow(currentFocusView.getWindowToken(), 0);
    }
}

and call it as something like:

    hideSoftKeyboard(this);

or

    hideSoftKeyboard(this.getActivity());

Thanks a lot for this contribution!!

Add licence details

This is a great project.

What licence does it use? I hope something like Apache 2.

Could you add licence files/headers?

unfortunately, interfacepluggin has stopped

by the time I clicked on the button to start the database manager. this "unfortunately, interface plugin has stopped" appear. I followed every step that you gave but still database manager is not starting. Please help me.

Issue in ReadMe

In the ReadMe file, the Android Manifest code is missing.

    <activity android:name="PACKAGE.AndroidDatabaseManager"
        android:label="@string/app_name"/>

dbm.getData

What about getdata ?

dbm.getData(Query8);

Minor typos

"Query" is misspelled a twice in various text boxes and messages (look for "Queru"). "Table" is also misspelled as "tuple".

Otherwise this code has been a tremendous help to me while debugging and testing THANK YOU so much! Seriously, this is great!

Edit this Row Workflow is non-intuitive

When I click on a row, I am shown a popup with "values", and "Click Here to Change this row" followed by the names and values of all the columns.

Now if I click on the spinner and choose "Update this row", everything works fine. However, if I directly click on a column value (without clicking on "Update this row"), it allows me to edit the value, but when I click OK, nothing happens. This is very confusing.

Suggestion: If I directly click on a column value (without clicking on "Update this row"), it should work exactly as if I have already clicked "Update this row".

Alternative suggestion: Don't allow editing of values unless "Update this row" has been clicked.

setId(299)

On line 835 of AndroidDatabaseManager.java there is some id: 299 - what is it?

Not showing table list

I have implemented every step you mentioned, but not able to see any table name or drop-down is not open for table selection.
Please check below screenshot.
screenshot

Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 2 to 1

It works well when no database upgrades. But I got the following errors after upgrading the database(by dbHelper = new MyDatabaseHelper(this, "BookStore.db", null, 2)):
11-14 09:57:08.108 23201-23201/com.xlab.iscas.databasetest E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xlab.iscas.databasetest/com.xlab.iscas.databasetest.AndroidDatabaseManager}: android.database.sqlite.SQLiteException: Can't downgrade database from version 2 to 1 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122) at android.app.ActivityThread.access$600(ActivityThread.java:140) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4895) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761) at dalvik.system.NativeStart.main(Native Method) Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 2 to 1 at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:361) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:255) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164) at com.xlab.iscas.databasetest.MyDatabaseHelper.getData(MyDatabaseHelper.java:67) at com.xlab.iscas.databasetest.AndroidDatabaseManager.onCreate(AndroidDatabaseManager.java:246) at android.app.Activity.performCreate(Activity.java:5163) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)  at android.app.ActivityThread.access$600(ActivityThread.java:140)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4895)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)  at dalvik.system.NativeStart.main(Native Method) 
Does anybody help? :)

A minor change

Hi, I love this! Thank you!

One problem, if a table is empty, you cannot add a row or drop it. To fix this, look for if(c2!=null) (line 393).
Move line 401 - 670 above the if statement on 393.

It worked for me.
Thanks again!

Next page problem

Hi, there's a problem on click next page when recordcount is equal to maxrecords per page in paginatetable function.
I changed it to:

final Cursor c3 = indexInfo.maincursor;
indexInfo.numberofpages=(int) Math.ceil(((double)c3.getCount()/10)); //10 is max. records

And works. Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.