StaggeredTextGridView


Source link: https://github.com/riontech-xten/StaggeredTextGridView

StaggeredTextGridView

A simple and attractive custom text GridView design based on material concepts.

  • Auto adjustable column based on device width and height.
  • Supported with portrait and landscape orientations.
  • Extends ScrollView


Setup

To use StaggeredTextGridView in your projects, simply add the library as a dependency to your build.

Maven
<dependency>
<groupId>com.riontech.staggeredtextgridview</groupId>
<artifactId>staggeredtextgridview</artifactId>
<version>1.0.1</version>
<type>pom</type> </dependency> 
Gradle
dependencies {

compile 'com.riontech.staggeredtextgridview:staggeredtextgridview:1.0.1' 
}
 
Updated

1.Added some custom attributes listed below

  • horizontalSpace - dimension (add space between coloumn)
  • verticalSpace - dimension (add space between row)
  • isFitToScreen - boolean (if true, last row set to fit into screen)

2.Resolved issue of Word not completely visible

Alternatively you can directly import the /library project into your Android Studio project and add it as a dependency in your build.gradle.

The library is currently configured to be built via Gradle only. It has the following dependencies:

  • Android Gradle plugin 2.1.0 - com.android.tools.build:gradle:2.1.0
  • Android Support appcompt-v7 - com.android.support:appcompat-v7:23.1.1
  • Compiled SDK Version - lollipop-23
  • Supported Version - >= 2.1

Usage

For more detailed code example to use the library, Please refere the /sample app.

StaggeredTextGridView can be added as a custom view to any layout.

<com.riontech.staggeredtextgridview.StaggeredTextGridView

custom:horizontalSpace="2dp"

custom:verticalSpace="2dp"

custom:isFitToScreen="false"

android:background="@color/white"

android:id="@+id/staggeredTextView"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_below="@+id/toolbar" /> 

Simply create the object of StaggeredTextGridView and set your custom BaseAdapter

StaggeredTextGridView staggeredTextGridView = (StaggeredTextGridView) findViewById(R.id.staggeredTextView);
 CustomAdapter adapter = new CustomAdapter(this, wordJsonArray);
 staggeredTextGridView.setAdapter(adapter);
 

TODO

  1. Item selector drawable
  2. Item click listener

Licence

Copyright (c) 2016 riontech-xten  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Theo is a Gradle plugin that provides annotations for each "dangerous android permission".

Customized toggle button.

Cicerone is a lightweight library that makes the navigation in an Android app easy.

Custom view to pick up a value from a given range using click button or swiping.

ImageMap is a small android library for displaying multiple image on a view using an adapter, you can then retrieve tap event on defined image.

SpannableBar is a Grid-style spannable bar, that is useful when you need a way to span a bar over columns. The view allows you to set the starting column, the span, the number of columns, and more.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes