• Stars
    star
    219
  • Rank 181,133 (Top 4 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Introducing Gravity View: Because swiping is so yesterday!

Gravity View for Android

API Android Arsenal

Gravity View is an Android adaptation of Facebook instant articles. The concept behind the library is to utilize the motion sensors of an Android device and allow the end user to explore the product by rotating his device. It uses gyroscope motion sensor readings to scroll the image.

You can read more about Gravity View article here

Gravity View video

Demo

Install Demo app or APK from Releases on your device and experience the gravity view.

Requirements

  • Android 3.0 or higher

Usage

Gradle dependency

dependencies {
    compile 'co.gofynd.library:gravity-view:1.0'
}

Sample Code:

Inside Layout XML File:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scrollbars="none">
        <ImageView
            android:id="@+id/bg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </HorizontalScrollView>
</RelativeLayout>

Inside Activity or Fragment:

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        gravityView = GravityView.getInstance(this)
                .setImage(bg, R.drawable.landingbg)
                .center();
    }
    @Override
    protected void onResume() {
        super.onResume();
        gravityView.registerListener();
    }
    @Override
    protected void onStop() {
        super.onStop();
        gravityView.unRegisterListener();
    }

Check if device is supported:

boolean is_supported = gravityView.deviceSupported();

Roadmap

  • Multiple image support
  • Support for Non-Gyroscope devices using Accelerometer sensor

Contributions

Any contributions are welcome! Please check the contributing guideline before submitting a new issue.

Developed By

  • Fahim Sakri

License

Copyright 2017 Shopsense Retail Technologies Pvt Ltd.

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.

More Repositories

1

flask-full

starter/boilerplate flask application with celery, mongoengine, signals, shell commands, swagger api docs and sphinx docs integration
Python
154
star
2

mildnet

Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
Jupyter Notebook
84
star
3

fdk-client-javascript

Fynd Development Kit(FDK) for Javascript
JavaScript
21
star
4

fdk-cli

FDK CLI
TypeScript
16
star
5

celery-autoscale

Python
16
star
6

nitrozen-vue

Nitrozen Design (Alpha) for Vue by Fynd
Vue
15
star
7

fdk-extension-javascript

FDK Extension Helper Library
JavaScript
9
star
8

nitrozen-ios

Swift
6
star
9

kube-bootstrapper

Bootstrap Kubernetes cluster with nginx-ingress and ALB on AWS using kops and Terraform
Shell
5
star
10

nitrozen-react

Nitrozen React
TypeScript
5
star
11

nitrozen-android

Nitrozen Design for Android
Kotlin
5
star
12

fdk-client-swift

Fynd Development Kit(FDK) for Swift 
Swift
5
star
13

ansible-metricbeat

Ansible role to install and setup Metricbeat
Python
5
star
14

NQ2SQ

Tool to convert natural language questions to appropriate SQL query for MYSQL db to answer that questions.
Python
4
star
15

fdk-client-apispec

FDK Client API Spec
4
star
16

angular-json-viewer

Angular2+ JSON Viewer component. JSON in HTML with syntax highlight like Chrome DevTools.
TypeScript
4
star
17

simpl-python

Python Client for Simpl API
Python
3
star
18

huffer-edge

Huffer: On The Fly Image Transformation Library for Cloud!
JavaScript
3
star
19

ec2-scheduler

ec2-scheduler is a service powered by AWS Lambda to automatically start and stop ec2 instances
Python
3
star
20

fdk-client-kotlin

Fynd Development Kit(FDK) for Kotlin
Kotlin
3
star
21

alb-logs-parser

Python
3
star
22

fdk-client-golang

Fynd Development Kit(FDK) for Golang
Go
2
star
23

fdk-extension-bridge-javascript

JavaScript
2
star
24

ansible-nginx

Ansible role to install and setup nginx web server
Ruby
2
star
25

fdk-extension-java

FDK Extension Helper Library
Java
2
star
26

asyncio-requests

Python
1
star
27

axios-adapter-logger

Adapter Based Logger
JavaScript
1
star
28

ecs_provision

Python
1
star
29

gofynd.github.io

CSS
1
star
30

glamar-ios-demo

Swift
1
star
31

collator

TypeScript
1
star
32

ignite

A Python framework for managing Dataproc cluster and Scheduling PySpark Jobs over it. Additionally it provides docker based development for debugging PySpark jobs.
Python
1
star
33

example-extension-java-vue

This is example extension sample code Java + Vue
Java
1
star
34

fdk-client-java

Fynd Development Kit(FDK) for Java
Java
1
star
35

fdk-store

JavaScript
1
star