Array
(
    [0] => WP_Term Object
        (
            [term_id] => 21
            [name] => Android
            [slug] => android
            [term_group] => 0
            [term_taxonomy_id] => 21
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 66
            [filter] => raw
            [cat_ID] => 21
            [category_count] => 66
            [category_description] => 
            [cat_name] => Android
            [category_nicename] => android
            [category_parent] => 0
        )

    [1] => WP_Term Object
        (
            [term_id] => 23
            [name] => Android Ideas
            [slug] => android-ideas
            [term_group] => 0
            [term_taxonomy_id] => 23
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 13
            [filter] => raw
            [cat_ID] => 23
            [category_count] => 13
            [category_description] => 
            [cat_name] => Android Ideas
            [category_nicename] => android-ideas
            [category_parent] => 0
        )

    [2] => WP_Term Object
        (
            [term_id] => 22
            [name] => Android Library
            [slug] => android-library
            [term_group] => 0
            [term_taxonomy_id] => 22
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 52
            [filter] => raw
            [cat_ID] => 22
            [category_count] => 52
            [category_description] => 
            [cat_name] => Android Library
            [category_nicename] => android-library
            [category_parent] => 0
        )

    [3] => WP_Term Object
        (
            [term_id] => 84
            [name] => Android Source Code
            [slug] => android-source-code
            [term_group] => 0
            [term_taxonomy_id] => 84
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 24
            [filter] => raw
            [cat_ID] => 84
            [category_count] => 24
            [category_description] => 
            [cat_name] => Android Source Code
            [category_nicename] => android-source-code
            [category_parent] => 0
        )

    [4] => WP_Term Object
        (
            [term_id] => 128
            [name] => Java
            [slug] => java
            [term_group] => 0
            [term_taxonomy_id] => 128
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 6
            [filter] => raw
            [cat_ID] => 128
            [category_count] => 6
            [category_description] => 
            [cat_name] => Java
            [category_nicename] => java
            [category_parent] => 0
        )

    [5] => WP_Term Object
        (
            [term_id] => 138
            [name] => Java Library
            [slug] => java-library
            [term_group] => 0
            [term_taxonomy_id] => 138
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 4
            [filter] => raw
            [cat_ID] => 138
            [category_count] => 4
            [category_description] => 
            [cat_name] => Java Library
            [category_nicename] => java-library
            [category_parent] => 0
        )

)
///////////

Android Circular Layout Manager

0
100
How to add Circular Layout Manager
How to add Circular Layout Manager

In our previous article we discuss about some Andoroid layout library like AwesomeLayoutManager, dynamicLayoutManager and Two Panel Layout but today we discuss Custom Layout Manager for Recycler View.

Circular Layout Manager

Custom Layout Manager for Recycler View which lays out its child views in circular or elliptical fashion

Scroll Wheel functionality implemented along with Circular Relative Layout

Integeration

Use the following dependency snippet in your app level build.gradle file to include this library in your project:

dependencies {
  
    compile 'com.github.kapil93:circular-layout-manager:1.0.0'
}
Demo 1 : Circular Layout Manager
Demo 1 : Circular Layout Manager
Demo 2 : Circular Layout Manager
Demo 2 : Circular Layout Manager

Ex: Source code

private void initViews() {
        recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
        scrollWheel = (ScrollWheel) findViewById(R.id.scroll_wheel);

        addItemButton = (FloatingActionButton) findViewById(R.id.add_item_button);
        scrollWheelToggleButton = (FloatingActionButton) findViewById(R.id.scroll_wheel_toggle_button);
    }

 

private void setViews() {
       initializeList();
       recyclerView.setAdapter(new RecyclerViewAdapter(getApplicationContext(), list));
       recyclerView.addItemDecoration(new RecyclerItemDecoration());
       recyclerView.setLayoutManager(new CircularLayoutManager(getApplicationContext(), 200, -100));
       recyclerView.addOnItemTouchListener(new OnRecyclerItemClickListener(getApplicationContext(),
               new OnRecyclerItemClickListener.OnItemClickListener() {
           @Override
           public void OnItemClick(RecyclerView parent, int childIndex) {
               Toast.makeText(MainActivity.this, ((TextView) parent.getChildAt(childIndex)
                       .findViewById(R.id.event)).getText(), Toast.LENGTH_SHORT).show();
           }
       }));

       scrollWheel.setRecyclerView(recyclerView);
       scrollWheel.setScrollWheelEnabled(false);
       scrollWheel.setHighlightTouchAreaEnabled(false);
       //scrollWheel.setConsumeTouchOutsideTouchAreaEnabled(false);
       scrollWheel.setTouchAreaThickness(50);
       scrollWheel.setOnItemClickListener(new OnItemClickListener() {
           @Override
           public void onItemClick(ScrollWheel scrollWheel, int childIndex) {
               Toast.makeText(MainActivity.this, "OC " + ((TextView) scrollWheel.getRecyclerView()
                       .getChildAt(childIndex).findViewById(R.id.event)).getText(), Toast.LENGTH_SHORT).show();
           }

           @Override
           public void onItemLongClick(ScrollWheel scrollWheel, int childIndex) {
               Toast.makeText(MainActivity.this, "OLC " + ((TextView) scrollWheel.getRecyclerView()
                       .getChildAt(childIndex).findViewById(R.id.event)).getText(), Toast.LENGTH_SHORT).show();
           }
       });

       addItemButton.setOnClickListener(this);
       scrollWheelToggleButton.setOnClickListener(this);
   
Hope you like this comparison. Please share your thought and experience in comment section.

Share your thoughts

Loading Facebook Comments ...
Loading Disqus Comments ...