All Projects → turkergoksu → SocialOrbitLayout

turkergoksu / SocialOrbitLayout

Licence: MIT license
Kotlin based custom view to show floating objects that can be used for social apps.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to SocialOrbitLayout

Social Text View
A custom Android TextView that highlights social media lingo (#hashtags, @mentions, phone, emails, and urls).
Stars: ✭ 64 (+128.57%)
Mutual labels:  social, social-media
Graphjs
A set of widgets for a meaningfully social web.
Stars: ✭ 212 (+657.14%)
Mutual labels:  social, social-media
Awesome Humane Tech
Promoting Solutions that Improve Wellbeing, Freedom and Society
Stars: ✭ 2,234 (+7878.57%)
Mutual labels:  social, social-media
Aardwolf
Powering connected social communities with open software.
Stars: ✭ 379 (+1253.57%)
Mutual labels:  social, social-media
ts-ui
Telar Social Network using Reactjs
Stars: ✭ 35 (+25%)
Mutual labels:  social, social-media
Socialmanagertools Igbot
🤖 📷 Instagram Bot made with love and nodejs
Stars: ✭ 699 (+2396.43%)
Mutual labels:  social, social-media
Socialblocklists
Blocklists to block the communication to social networking sites and privacy harming services
Stars: ✭ 161 (+475%)
Mutual labels:  social, social-media
ts-serverless
Telar Social Network using OpenFaaS and Kubernetes. Run your own server-less social network. One command from OpenFaaS Cloud to build Social Network.
Stars: ✭ 34 (+21.43%)
Mutual labels:  social, social-media
social
A simple social media using MEAN Stack. Frontend: Angular 6.
Stars: ✭ 13 (-53.57%)
Mutual labels:  social, social-media
SocialMedia-App
A fully functional social media app built with flutter with multiple features
Stars: ✭ 646 (+2207.14%)
Mutual labels:  social, social-media
Socialhome
A federated social home
Stars: ✭ 282 (+907.14%)
Mutual labels:  social, social-media
socialx react native
The SocialX ecosystem takes the social media experience to the next level.
Stars: ✭ 20 (-28.57%)
Mutual labels:  social, social-media
anon.land
open source Imageboard just like was Voxed.net
Stars: ✭ 16 (-42.86%)
Mutual labels:  social, social-media
Snax
Decentralized Social Media Overlay
Stars: ✭ 18 (-35.71%)
Mutual labels:  social, social-media
pH4Social
📣 Social Networking Software built with Laravel PHP framework and Bootstrap.
Stars: ✭ 27 (-3.57%)
Mutual labels:  social, social-media
Reddit Detective
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more
Stars: ✭ 129 (+360.71%)
Mutual labels:  social, social-media
Hhfloatingview
An easy to use and setup floating view for your app. 🎡
Stars: ✭ 93 (+232.14%)
Mutual labels:  floating, custom-view
Socialview
Android TextView and EditText with hashtag, mention, and hyperlink support
Stars: ✭ 217 (+675%)
Mutual labels:  social, social-media
LinkedIn Scraper
🙋 A Selenium based automated program that scrapes profiles data,stores in CSV,follows them and saves their profile in PDF.
Stars: ✭ 25 (-10.71%)
Mutual labels:  social, social-media
LaColorduino
I build my own clone of "LaMetric"-smartwatch but with some Colorduino for Twitch, YouTube, Twitter, CSGO, etc.. (Working)
Stars: ✭ 56 (+100%)
Mutual labels:  social, social-media

SocialOrbitLayout

Adjustable custom view that can be used for loading screens or welcome pages inside social apps to show floating objects around an orbit. Inspired by Blogging app landing page.

intro

All the example images are generated from thispersondoesnotexist.com.

🛠️Setup

1. Add the JitPack repository to your build file.

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

2. Add the dependency

dependencies {
    implementation 'com.github.turkergoksu:SocialOrbitLayout:1.0.0'
}

🕹️Usage

<me.turkergoksu.lib.view.SocialOrbitLayout
            android:id="@+id/socialOrbitLayout"
            android:layout_width="match_parent"
            android:layout_height="400dp"
            app:innerOrbitAngleDistance="120"
            app:innerOrbitAnimDuration="30000"
            app:innerOrbitColor="#e0ecff"
            app:innerOrbitRadius="90dp"
            app:innerOrbitStartAngle="20"
            app:innerOrbitWidth="40dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:outerOrbitAngleDistance="90"
            app:outerOrbitAnimDuration="60000"
            app:outerOrbitColor="#d3d3d3"
            app:outerOrbitPadding="40dp"
            app:outerOrbitStartAngle="70"
            app:outerOrbitWidth="2dp" />

Currently, you can programmatically add FloatingImage to Orbit with given Bitmap.

⚠️ You may set Orbit attributes programmatically but it will be overwritten by the values in the layout.

var orbit = Orbit.Builder()
        .setFloatingObjectList(
                mutableListOf(
                    // .
                    // .
                    // .
                    FloatingImage.Builder()
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy1))
                        .setBackgroundColor(Color.parseColor("#2e7fff"))
                        .setSize(70f)
                        .setLocation(FloatingObjectLocation.CENTER)
                        .build(),
                    FloatingImage.Builder()
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy2))
                        .setSize(50f)
                        .setLocation(FloatingObjectLocation.INNER)
                        .build(),
                    FloatingImage.Builder()
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy3))
                        .setLocation(FloatingObjectLocation.OUTER)
                        .build(),
                    // .
                    // .
                    // .
                )
        )
        .setOuterOrbitWidth(width = 2f)
        .setInnerOrbitColor(Color.parseColor("#2e7fff"))
        .setOuterOrbitAngleDistance(distance = 90.0)
        .setOuterOrbitAnimDuration(duration = 60000)
        .setInnerOrbitRadius(radius = 90f)
        .setInnerOrbitAngleDistance(distance = 120.0)
        .setInnerOrbitAnimDuration(duration = 30000)
        .build()
socialOrbitLayout.setOrbit(orbit)

If you don't want to create a FloatingImageBuilder for every FloatingImage object, you may create a single builder and change it's attributes. This implementation actually better for objects that shares same attributes(Or the majority). Check the following example.

val floatingImageBuilder = FloatingImage.Builder()
                .setBackgroundColor(Color.RED)
                .setBorderWidth(3f)
                .setSize(50f)
                
var orbit = Orbit.Builder()
        .setFloatingObjectList(
                mutableListOf(
                    // .
                    // .
                    // .
                    floatingImageBuilder.copy() // copy() is crucial here!
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy1))
                        .setBackgroundColor(Color.WHITE)
                        .setSize(70f)
                        .setLocation(FloatingObjectLocation.CENTER)
                        .build(),
                    floatingImageBuilder.copy()
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy2))
                        .setLocation(FloatingObjectLocation.INNER)
                        .build(),
                    floatingImageBuilder.copy()
                        .setBitmap(BitmapFactory.decodeResource(resources, R.drawable.dummy3))
                        .setBorderWidth(2f)
                        .build(),
                    // .
                    // .
                    // .
                )
        )
        .build()
socialOrbitLayout.setOrbit(orbit)

📝Attributes

SocialOrbitLayout

Name Format Default Description
outerOrbitColor color Color.LTGRAY Color of the outer orbit.
outerOrbitWidth dimension 2dp Width of the outer orbit.
outerOrbitAnimDuration integer 60000 The time that any floating object will make 1 full turn in outer orbit with given milliseconds.
outerOrbitPadding dimension 40dp The padding between outer orbit and whole view.
outerOrbitStartAngle integer 70 The start angle of first floating object on outer orbit.
outerOrbitAngleDistance integer 90 The angle distance between floating objects on outer orbit.
innerOrbitRadius dimension 90dp Radius of the inner orbit.
innerOrbitColor color #F8F4FE Color of the inner orbit.
innerOrbitWidth dimension 40dp Width of the inner orbit.
innerOrbitAnimDuration integer 30000 The time that any floating object will make 1 full turn in inner orbit with given milliseconds.
innerOrbitStartAngle integer 20 The start angle of first floating object on inner orbit.
innerOrbitAngleDistance integer 120 The angle distance between floating objects on inner orbit.

FloatingImage

⚠️ To avoid any future confusion after seeing SocialOrbitLayout, the following attributes are for the FloatingImage object and not for the layout file. Because currently there isn't any FloatingObjectView attribute implementation.

Name Format Default Description
bitmap Bitmap null The image that FloatingObjectView shows.
backgroundColor Int Color.WHITE Background color of floating image. In order to observe the color borderWidth needs to be bigger than 0f.
borderWidth Float 2f Border width of FloatingObjectView.
size Float 40f Size of the FloatingObjectView(not bitmap).
elevation Float 10f Elevation value of FloatingObjectView.
location FloatingObjectLocation FloatingObjectLocation.OUTER Location of FloatingObjectView. Can take three values named FloatingObjectLocation.CENTER, FloatingObjectLocation.OUTER and FloatingObjectLocation.INNER.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].