You can set the seekbar max value either programmatically or in layout.xml file.
In Layout Xml file
✌️ Add android:max="YOUR_MAX_VALUE" in the Seekbar tag to set the max value.
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:max="225"
android:layout_marginTop="45dp" />
Programmatically using Java code:
In order to set the max value in java file you can use the function setMax(INTEGER) on seekbar object to set the max value.
seekBar = (SeekBar) findViewById(R.id.seekBar1);
seekBar.setMax(225);
More Posts related to android,
- appcompat_v7 errors after updates to API level 21 Material Theme
- adb: The Android Debug Bridge and Commands
- The Android Virtual Device myEmulator is currently running an emulator and cannot be deleted.
- How to make TextView Text Transparent [Android]
- Android is starting optimizing... app 1 of 1
- How to make Text in TextView bold and italic in Android
- Android Development - How to switch between two Activities
- Android : IOException: Unable to open sync connection!
- Android Toolbar example with appcompat_v7 21
- How to Change Android Title Bar Color?
- How to Add Padding to Android TextView
- JavaScript : redirect page to other url
- Programmatically Send an Email from Android App using Intent
- What is Android Toast.LENGTH_SHORT and Toast. LENGTH_LONG durations
- [Soluiton] You already have the latest version of Android Studio installed
- Detect swipes on Android Activity
- Add Buttons at the bottom of Android Layout xml file
- Android Lint app_name is not translated in af (Afrikaans) am (Amharic) ar (Arabic) bg (Bulgarian)
- Hide Navigation Bar from Android Screen Activity
- Android Disable EditText from Auto Focus on Activity load
- Toast not getting displayed Android App
- How to Enable Developers Option in Android Phones Settings
- Android : Duplicate registration for activity com.example.abc
- Android ListView turns Black or Flickers while Scrolling
- Android Studio Ctrl Shift o auto import not working
More Posts:
- How to run CMD console commands in Notepad++ - NotepadPlusPlus
- Base64 Encoding Decoding in Python Programming - Python
- Read a file using Java 8 Stream - Java
- Know your Public IP Address Tool - Tools
- Where to find Azure Virtual Machine (VM) Pricing Details in Azure Portal - Azure
- Capitalize the first letter of each word using Notepad++ - NotepadPlusPlus
- How to uninstall Microsoft Outlook on Mac - MacOS
- How to create SharePoint List Item programmatically using C#.net - SharePoint