Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Java for Android
  • Android Studio
  • Android Kotlin
  • Kotlin
  • Flutter
  • Dart
  • Android Project
  • Android Interview
Open In App
Next Article:
Ferris Wheel in Android
Next article icon

Ferris Wheel in Android

Last Updated : 08 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Building a Ferris Wheel in Android is another best thing to do for beginner Android developers. With the help of dependency, you can be able to create the Ferris Wheel. Ferris Wheel is an Android library that is a unique way to represent data in the Animated form. In this article, we are going to see how to implement the Ferris Wheel in Android. Below is a sample GIF of the Ferris Wheel.

Application of Ferris Wheel

  • The Ferris Wheel is a unique way of representing data or various options.
  • This Ferris Wheel is used in most of the games built for children to learn to count, the alphabet in animated form. So that small children can gain interest in it.
  • You can see this Ferris Wheel in the spin wheel game to earn rewards.
  • This Ferris wheel can also be used to represent various options in circular list form.

Attributes of Ferris Wheel

Attribute

Description

fwv_cabinsNumberUse to give the number of cabins on the wheel. 
fwv_isAutoRotateThe Wheel rotates automatically. 
fwv_isClockwiseThe Wheel rotates in a clockwise direction. 
fwv_rotateSpeedUse to give wheel rotation speed. 
fwv_cabinSizeUse to determine the size of the cabin. 
fwv_cabinFillColorUse to give color to each cabin. 
fwv_startAngleThe angle at which the wheel starts rotating. 
fwv_wheelStrokeColorTo give color to the wheel. 
fwv_cabinLineStrokeColorCabin lines will be filled with colors. 

Step by Step Implementation

Step 1: Create a New Project

To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio. 

Step 2: Add dependency of the library in build.gradle file

Navigate to gradle scripts and then to build.gradle(Module) level. Add below line in build.gradle file in the dependencies section.

implementation 'ru.github.igla:ferriswheel:1.2'

After adding dependency click on the “sync now” option on the top right corner to sync the project.

Step 3: Working with the activity_main.xml file

Go to the activity_main.xml file and refer to the following code. Below is the code for the activity_main.xml file.

Java
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context=".MainActivity">      <ru.github.igla.ferriswheel.FerrisWheelView         android:id="@+id/ferrisWheelView"         android:layout_width="300dp"         android:layout_centerInParent="true"         android:layout_height="300dp"         android:layout_gravity="center"         app:fwv_cabinsNumber="8"         app:fwv_rotateSpeed="10" />  </RelativeLayout> 

Output:


Next Article
Ferris Wheel in Android

C

chinmaymunje96
Improve
Article Tags :
  • Technical Scripter
  • Android
  • Technical Scripter 2020
  • Android-Animation

Similar Reads

    WheelView in Android
    In this article, WheelView is added in android. WheelView provides a very impressive UI that allows the developer to create a Wheel and add items according to his need. Some important tags provided by WheelView are wheelArcBackgroundColor, wheelAnchorAngle, wheelStartAngle, wheelMode, wheelCenterIco
    3 min read
    What is an Android Emulator?
    The Android SDK provides a virtual mobile device emulator that runs on a computer. An android emulator is used for executing, debugging, and testing android applications. The emulator helps the developer to run a trial product virtually without an actual hardware device. An emulator is similar to a
    3 min read
    Getting Started with Android Things
    Basically, Android Things refers to the summation of Android and the Internet of Things. IoT is very autonomous it means the Internet of Things, whatever the IoT device is, it can sense through sensors and do its respective task without very much human interaction and Android Things revolves around
    4 min read
    Interesting Facts About Android
    Android is a Mobile Operating System that was released on 23, September 2008. Android is free, open-source operating system and is based on modified version of Linux kernel. Open Handset Alliance (OHA) developed the Android and Google commercially sponsored it. It is mainly designed for touchscreen
    3 min read
    Android Tutorial
    In this Android Tutorial, we cover both basic and advanced concepts. So whether you are a fresher (graduate) or an experienced candidate with several years of Android Development experience, you can follow this Android tutorial to kick-start your journey in Android app development. Our Android Tutor
    15+ min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences