GithubHelp home page GithubHelp logo

mdbelma / hj-qibla-compass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hassaanjamil/hj-qibla-compass

0.0 0.0 0.0 17.37 MB

An opensrouce library to incorporate/start Qibla Direction Activity in your native android application.

License: Apache License 2.0

Java 83.74% Kotlin 16.26%

hj-qibla-compass's Introduction

hjQiblaCompass

An open source Android (Java) Native Library to incorporate/start Android Qibla Direction Activity in your Native Android Applcation.

Configurations

Dependency

implementation 'com.hassanjamil:qibla:0.2.2'

Root Level build.gradle

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        google()
        maven { url "http://api.tplmaps.com:8081/artifactory/example-repo-local/" }
    }
}

AndroidManifest.xml

<activity
	android:name="com.hassanjamil.hqibla.CompassActivity"
	android:label="@string/app_name"
	android:screenOrientation="portrait"/>

Sample Code

Intent intent = new Intent(MainActivity.this, CompassActivity.class);
intent.putExtra(Constants.TOOLBAR_TITLE, "My App");		// Toolbar Title
intent.putExtra(Constants.TOOLBAR_BG_COLOR, "#FFFFFF");		// Toolbar Background color
intent.putExtra(Constants.TOOLBAR_TITLE_COLOR, "#000000");	// Toolbar Title color
intent.putExtra(Constants.COMPASS_BG_COLOR, "#FFFFFF");		// Compass background color
intent.putExtra(Constants.ANGLE_TEXT_COLOR, "#000000");		// Angle Text color
intent.putExtra(Constants.DRAWABLE_DIAL, R.drawable.dial);	// Your dial drawable resource
intent.putExtra(Constants.DRAWABLE_QIBLA, R.drawable.qibla); 	// Your qibla indicator drawable resource
intent.putExtra(Constants.FOOTER_IMAGE_VISIBLE, View.VISIBLE|View.INVISIBLE|View.GONE);	// Footer World Image visibility
intent.putExtra(Constants.LOCATION_TEXT_VISIBLE, View.VISIBLE|View.INVISIBLE|View.GONE); // Location Text visibility
startActivity(intent);

Screenshot

Contributor

Muhammad Hassan Jamil
Team Lead Android Development
[email protected]

Please contirbute to help in improvin' it.

Reference

This code is based on https://github.com/iutinvg/compass/

hj-qibla-compass's People

Contributors

hassaanjamil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.