Affichage des articles dont le libellé est Changed. Afficher tous les articles
Affichage des articles dont le libellé est Changed. Afficher tous les articles

vendredi 29 janvier 2016

Maintain/Remember Changed items position after restarting app (Using ItemTouchHelper)



Hello, I'm having a problem in remembering items position after being changed, I'm using ItemTouchHelper to achieve the drag and drop effect, after being changed, restarting will reset the changes back to the default.

So, What's the way to maintain the changed positions ?

Here's the code :


HTML Code:


    ItemTouchHelper.Callback _ithCallback = new ItemTouchHelper.Callback() {
    //and in your imlpementaion of
    public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
        // get the viewHolder's and target's positions in your adapter data, swap them
        Collections.swap(AllItems, viewHolder.getAdapterPosition(), target.getAdapterPosition());
        // and notify the adapter that its dataset has changed

        rcAdapter.notifyItemMoved(viewHolder.getAdapterPosition(), target.getAdapterPosition());
        return true;
    }

 [MENTION=439709]override[/MENTION]
    public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
        //TODO
    }

    //defines the enabled move directions in each state (idle, swiping, dragging).
 [MENTION=439709]override[/MENTION]
    public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
        return makeFlag(ItemTouchHelper.ACTION_STATE_DRAG,
                ItemTouchHelper.DOWN | ItemTouchHelper.UP | ItemTouchHelper.START | ItemTouchHelper.END);
    }
};



Download from this link

Phone model number changed after flashing rom



Hi ,

I have a flashed a rom that I think did not work for my model ( Now my phone says model number is SM-G925K) and I have no more signal. I believe the model number is the issue, but I'm not sure...

It was supposed to be a SM-G920W8.

Any idea how I can reverse it back?

This is the rom that I tried to install : http://forum.xda-developers.com/gala...11-0b-t3295183

This is the rom that I was on :

http://forum.xda-developers.com/gala...n-1-0-t3094423

Please help!

Download from this link

Marshmallow update changed sdcard1 name



After updating to marshmallow, I see paths under the phone has changed like /storage/sdcard1 to /storage/9016-4EF8/
Due to this any apps like link2sd,ucbrowser etc are unable to detect my external sdcard because the apps are searching for term "sdcard1" in system and the name is changed to some random code name.
Is there any way I can change back the name to sdcard1 and with full write permissions?
My device is Redmi2 on Android 6.0 custom rom(Nxrom).

Download from this link