- How to Add and Customize Back Button of Action Bar in Android?
- Change back button android
- Android Default Back Navigation & Customization
- Android back button default behavior
- Why to customize back navigation
- How to enhance or override android default back navigation
- Scenario 1:
- Scenario 2:
- About
- Change back button android
- Change back button android
- Change back button android
How to Add and Customize Back Button of Action Bar in Android?
The action bar (sometimes referred to as the app bar), if it exists for an activity, will be at the top of the activity’s content area, typically directly underneath the status bar. It is a menu bar that runs across the top of the activity screen in android. Android ActionBar can contain menu items that become visible when the user clicks the “menu” button. In general, an ActionBar composed of the following four components:
- App Icon: App branding logo or icon will be shown here
- View Control: A dedicated space to display the Application title. Also provides the option to switch between views by adding spinner or tabbed navigation
- Action Buttons: Major actions of the app could be added here
- Action Overflow: All unimportant action will be displayed as a menu
Below is a sample image to show where the Action Bar/Toolbar/App Bar is present on an android device.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
The action bar is a primary toolbar inside an activity that can be used to display an activity title and other interactive items. One of the most used items is a Back Navigation Button. The back button is used to move backward from the previously visited screen by the user. Most Android devices have a dedicated back button still a back button on the action bar enhances the user experience.
Источник
Change back button android
Android Default Back Navigation & Customization
November 14, 2016 by Srinivas
Like web browser’s back button takes you through previously visited web pages, Android system back button moves you through previous screens of an active app. Like back button functionality in web browser is provided by browser, Android back button functionality is provided by Android system. Both of them load previous pages or screens from cache or stack on clicking or touching back button.
To provide back navigation for your app, you don’t need to do anything. In most cases default back navigation is sufficient to provide perfect back navigational experience to users.
Below you can see back button provided by android system, it takes you back to previously worked activities or screens of currently active app in reverse chronological order.
Android back button default behavior
Android uses back stack to keep track of worked-on screens in chronological order. Back button functionality uses back stack to show previous screens and state on pressing it. Android system creates a new back stack when user starts an app by launching main activity from home screen. If the app is already open but inactive, system brings it to foreground and uses existing stack to resume current activity or top activity in the stack.
When current activity opens a new activity, the new activity is placed on top of the stack. New activity becomes active and the activity which started the new activity becomes inactive and stays in the stack.
If current activity opens a new activity which is already in the stack, system creates a new instance of the new activity and places it on top of the stock.
Android allows applications to start components of other apps. When another application opens an activity in your app, the activity is placed in the stack of the app which started your app activity.
When user presses back button, current activity is removed from the stack and destroyed and previous activity becomes current from the stack. All the activities placed in a stack are considered as a task.
Why to customize back navigation
Default back button functionality may not be suitable in some scenarios. In these cases, you may have to customize back button functionality to provide consistent navigation experience to users. Here are two scenarios where you need to provide custom back button functionality.
One of the best features of android is allowing multiple entries meaning even though there needs to be one main activity which is instantiated when app icon is pressed, app can be entered into by starting any activity in your app. For example, users can come to your app from app widget or notifications and navigate directly to a deep screen in the app hierarchy. In this scenario, default back button flow may not provide best user experience.
Apps can embed web browser on screens. When user navigates in the embedded browser and visits few web pages, you may want to change the default android back button behavior. Instead of taking user to previous screen, you may want it to navigate back through browser historical pages and then default behavior of going back to previously visited screens.
How to enhance or override android default back navigation
I am going to provide code for two scenarios in which you may need to provide different back navigation behavior than default one.
Scenario 1:
User starts an activity in a separate stack, from notification or widget, which is deep in app hierarchy. In this case, default back button exits the app as it is a new stack without previous screens. Instead of exiting the app, taking the user to either main screen or starting screen of current flow gives user an opportunity to continue using the app. That means you need to add activities to back stack.
Below is the code to show above scenario and implementation. The sample application has three screens, MainActivity screen, ViewCoupon screen and ViewStoreCoupons screen. MainActivity has a button to send notification. The method which handles the click event sets the parent stack for the Intent which is started when user clicks notification. Notice that parent activity (ViewStoreCoupons) is configured for ViewCoupon activity in AndroidManifest.xml file.
Below is the flow to test the sample app.
- Start the app
- Click “send notification” button on main screen
- View notification by dragging notification drawer
- Click notification, it opens ViewCoupon activity in separate stack
- Click back button, it takes you to parent activity , ViewStoreCoupons activity , instead of existing the app
View coupons activity
View all coupons activity
Scenario 2:
You need to override onBackPressed method of the activity which embeds browser on the screen.
About
Android app development tutorials and web app development tutorials with programming examples and code samples.
Источник
Change back button android
Скачать:
версия: 2.2.1 Back Button Pro (Пост sosed.68 #81940115)
версия: 1.9.7 Mod Сообщение №14, автор Евгений Крупецкий
версия: 1.9.11 + Ad-Free Back Button Pro (Пост vitaxa978 #80524644)
версия: 1.4.1 Pro backbutton.pro_105.apk ( 1.19 МБ )
Сообщение отредактировал fivestarov — 25.02.19, 12:46
Back Button Pro русская версия: 1.4.1 backbutton.pro_105.Rus.apk ( 1.11 МБ )
Сообщение отредактировал papasha55 — 29.11.16, 20:12
Back_Button-v1.7.4Free Маркет
Что нового:
v1.7.4
— Improvements for reliability and speed.
v1.7.3
— Add Indonesian, Italian, Portuguese, Russian, Spanish, German, Japanese, French, Dutch language translation.Кнопка «Назад»_1.7.4.apk ( 893.06 КБ )
Версия без рекламы Кнопка Назад-v1.7.4No_ads.apk ( 857.26 КБ )
Сообщение отредактировал vitaxa978 — 17.09.16, 11:59
Кнопка_Назад-v1.8.1 Free Маркет
Что нового:
v1.8.0
-fix bugs
— Android 7.0 Support.Кнопка «Назад»_1.8.1.apk ( 1.92 МБ )
Версия без рекламы Доперевел непереведенное, оставил только рус. и англ. языки Кнопка «Назад»-v1.8.1Rus_No_ads.apk ( 1010.72 КБ )
Сообщение отредактировал vitaxa978 — 24.11.16, 08:04
Еще бы кнопка фиксировалась на экране,чтоб не смахивать ее при скролинге. и размер регулируемый.
Сообщение отредактировал aa494 — 25.11.16, 09:54
Кнопка Назад v1.9.7(3000) MOD
Особенности мода:
— Вырезал загрузку рекламы от Google, а также рекламные активити.
— Удалил все лишние локализации перевода меню, кроме Русского языка.
— Вырезал сбор аналитики.
— Для верности результата избавления от рекламного мусора отрезал программе доступ в интернет.
Ставить начисто, так как была изменена подпись пакета!Кнопка «Назад» v1.9.7(3000) MOD.apk ( 1.05 МБ )
Версия 1.9.9 (Free)
Новое:
— не известно.
Версия 2.2.1 с маркета (free)
Новое:
Remove rocket button.
Fill mode support.
Android O Support.
Remove Interstitial Ads for Google ads policy
All code re-write with kotlin.
This app use accessibility to help peoples with disability use the function of Back, Home, Recents buttons.
Коллеги, есть похожая прога на Андроид 2.2 ?
У меня старый LG-910 с отказавшими сенсорными кнопками на корпусе.
Все ищу похожую, чтобы на жк дисплее управлять своим 4″коммуникатором,
тем более все иконки там рабочие.
Хочу его как навигатор и запасный второй телефон в отпуске использовать.
Источник
Change back button android
Сообщение отредактировал just.live4fun — 12.10.19, 11:18
Тип: Модификация
Версия: 1.13
Краткое описание: Back buttom
Русифицированная версия.
ЧТО НОВОГО
Ver1.13
— Disclosed the reason for using accessibility service.
Скачать — Back button 1.13.17 RusMod.apk ( 1.03 МБ )
Сообщение отредактировал just.live4fun — 12.10.19, 11:32
Тип: Модификация
Версия: 1.13
Краткое описание: RUS by Rekembus
Полный перевод на русский
• Наличие краткого описания одной строкой, на русском языке, одним предложением чётко и лаконично описывающего назначение программы
• Наличие описания на русском или английском языке (при размещении описания на англ., рекомендуется оставить заявку на перевод описания в специальной теме), выкладывание машинных переводов — запрещено
• Обратите внимание, что размеры иконки/логотипа приложения в мастере тем должны быть от 120 до 200 пикселей.
• Наличие ссылки на Google Play, а при отсутствии там приложения — ссылки на источник с обязательным указанием авторства. Если автором является релизер приложения, то это так же должно быть отображено в теме.
При отсутствии прав на самостоятельное редактирование, исправления публикуются отдельными новыми сообщениями в той же теме.
Требуется учесть замечания и завершить оформление темы.
Источник
Change back button android
Краткое описание:
Пользовательские действия для клавиш громкости, кнопок «домой», «назад» или «Недавние».
Описание:
Button Mapper упрощает привязку пользовательских действий к кнопкам громкости, клавишам «домой», «назад» или «Недавно запущенные приложения». Измените свои кнопки, чтобы запустить любое приложение, ярлык или иное пользовательское действие. Назначьте пользовательские действия для одиночных нажатий, двойных нажатий и длительных нажатий на аппаратные кнопки вашего телефона.
ROOT не требуется.
The free version allows remapping of the Home button (if your phone has one) and volume buttons
Additional features unlocked in the pro version:
-support for back button, recent apps button and camera button
-Lockscreen peek
-Homescreen lock
-Four themes
-customization of haptic feedback (vibration) on button press and long press
-option to bypass specific apps
Actions that can be mapped to buttons or keys:
-Launch any app or shortcut
-Disable the button completely
-Home, back or recent apps
-Last app
-Turn screen off
-Toggle flashlight
-Quick settings
-Show notifications
-Power dialog
-Take screenshot
-Music: previous track, next track and play/pause
-Adjust volume
-Toggle do not disturb
-Adjust brightness
Buttons supported:
-Home
-Back (PRO version only)
-Recent apps (PRO version only)
-Volume up
-Volume down
-Camera button (PRO version only)
Special features:
-Lockscreen peek (PRO version only)
-Homescreen lock (PRO version only)
-Swap back and recent apps buttons
-Adjust button light duration on Samsung Galaxy devices (Lollipop and older)
-Adjust button vibration on Samsung Galaxy devices (PRO version only, Lollipop and older)
версия: 0.95 GPhomebutton_0.95-95_minAPI18(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi).apk ( 4.2 МБ )
Сообщение отредактировал iMiKED — 29.11.21, 04:51
Доброго времени суток
Поставил , поюзал , что-то постоянно слетают настойки, похоже еще совсем сырая прога 😎
alex19732408, автор этого и не утаивает) — сабж идёт как beta.
А какие именно настройки? Версия сабжа, ОС? М/б просто это варез некачественный .
Сообщение отредактировал anirov — 14.03.17, 21:25
твоя ,не ломаная,
.
Ставлю в основном на кнопку назад и кнопку недавние по два действия
P.S. на всякий пож., обновил версию из Маркета, в шапке .
Сообщение отредактировал anirov — 14.03.17, 22:10
Использую 2-й день «вылеченную» версию из шапки, у меня тоже периодически слетают настройки; причём, сначала я настроил NextTrack и Pause на удержание кнопок громкости: они слетают реже (1 раз за этот день),
а затем включил «регулировать громкость мультимедиа по умолчанию» и «к предыдущему приложению» на х2 RecentApps (Android 7, жду тебя): они слетали больше раз, 2 или 3.
А так, твик выглядит весьма полезно, + не просит лишних разрешений и нет рекламы.
Источник