Thursday, November 20, 2014

Back doing the android :)

For the last 3 years I was working under HealthGuru.com and was focused on doing mainly Javascript and PHP, was part of the team that builds client website (pluggable module sites) like the video sites of Diabetic Living Online.com and Pregnancy.org and web embed widgets like in sites Medhelp or Health Boards. It was a lot of fun doing it and learn a lot especially Javascript and how browser behaves. But sadly everything has to end, last year HealthGuru were brought by another company and since then it was on maintenance mode and last month I'm not with them anymore.

Now back in Android, as you could see I still do some android apps under Ramen Tech but almost no update on the blog :( One reason is that during those years i was relying on my previous knowledge on Android, i was using Fragment without understanding why it was created hah, i didnt know about the cool projects that Square gave to the android, and a lot more. And since Android changed a lot from 3 years ago, it was a perfect time to update my skills :)

As a start i'll do a shameless plug of the apps i created to enhance my skills
Throwback Thursday Reminder - if you never want to forget that you have to do tbt, explanation why i did this is on my G+ page

Social Days Reminder - for the ones that love posting theme/event based post on social networks, imagine getting reminded that today you have to post science sunday :)

For both project i used ButterKnife and appcompat-v7 to make it look consistent across all version (4.1+).

Wednesday, September 17, 2014

A tool for publishing screenshot for your android apps

Found a get app, if you're publishing app Android Apps you might need this app, it cleans your action bar before you take a screenshot.
Clean Status Bar

Wednesday, September 3, 2014

RecyclerView setEmptyView

From Android Docs, RecyclerView is a more advanced and flexible version of ListView because it is more efficient and it doesnt care about the visuals. From the looks of it, it expects that the RecyclerView must always have data but thats not always possible, as i search how empty views is done in RecyclerView i cant seem to find one (If you know one or his better then the following codes, please comment below).
So here is what i did
private void checkAdapterIsEmpty () {
        if (mAdapter.getItemCount() == 0) {
            mEmptyView.setVisibility(View.VISIBLE);
        } else {
            mEmptyView.setVisibility(View.GONE);
        }
    }

    protected void setupRecyclerView() {
        mAdapter = new MyAdapter(mItemList);
        mAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
            @Override
            public void onChanged() {
                super.onChanged();
                checkAdapterIsEmpty();
            }
        });

        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
        mRecyclerView.setHasFixedSize(true);

        mRecyclerView.setAdapter(mAdapter);
        checkAdapterIsEmpty();
    }

Tuesday, September 2, 2014

Android Wish

My friends over altlimit network created chipnship and my wish is to get this android collectable :)


Wednesday, July 30, 2014

Super slow when debugging with a device with ART

As i was debugging an android app on my nexus 5 i found that its super slow in nexus 5 but really fast on other mobile, turns out if you have ART enabled (kitkat+) the device cannot ensure the compiled matches the bytecode instructions. From stackoverflow.com they recommended to switch back to dalvik. Thats a bummer for in L ART is the only runtime, i hope they fix this in the future.