App Widget Part 2 – CONFIGURATION ACTIVITY – Android Studio Tutorial

In part 2 of the app widget tutorial, we add a configuration activity to our app, which starts when our widget is dragged onto the homescreen and where we can do an initial setup. We get our appWidgetId from the intent with the AppWidgetManager.EXTRA_APPWIDGET_ID key and can then make changes to this widget with help of the RemoteViews class. We will give the user the option to set his own button text and as in the last video we set a PendingIntent to our button which will open our MainActivity when clicked. We will also save the button text to SharedPreferences and then finish our activity with RESULT_OK and pass the appWidgetId back. In case we don’t get passed a valid id, our appWidgetId will be set to AppWidgetManager.INVALID_APPWIDGET_ID.
In our AppWidgetProvider class we retrieve the button text from shared preferences in our onUpdate method and reset it together with the pending intent to our button.
In our AndroidManifest.xml file we have to set the android.appwidget.action.APPWIDGET_CONFIGURE intent filter for our config activity and in the info xml file we have to add the android:configure attribute.

Watch the whole playlist:
https://www.youtube.com/playlist?list=PLrnPJCHvNZuDCoET8jL2VK4YVRNhVEy0K

Example code:
https://codinginflow.com/code-examples/android/app-widget/part-2

______________________________
Free 7-day trial for Treehouse courses:
https://treehouse.7eer.net/c/1141770/228915/3944

Great books to learn Android development:
-The Big Nerd Ranch Guide: ➣ http://amzn.to/2jGADD6
-Head First Android Development: ➣ http://amzn.to/2jHAmQz

Best equipment for long hours of coding:
-Keyboard: ➣ http://amzn.to/2khXPvJ
-Mouse: ➣ http://amzn.to/2jFYBi7

My recording equipment:
-Microphone: ➣ http://amzn.to/2DxbW4A

Disclaimer: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂

Installing Android Studio on Mac

Installing Android Studio on Mac
Channel: Easy 2 Code
Published: 2016-01-26 15:11:41
Duration: 11M13S
Views: 26618
Likes: 59
Favorites: 0

How to Make a Button Open a New Activity – Android Studio Tutorial

In this video we will learn, how to open a new Activity from a Button click. For this we will create a new Intent and pass it to the startActivity method.

______________________________
Free 7-day trial for Treehouse courses:
https://treehouse.7eer.net/c/1141770/228915/3944

Great books to learn Android development:
-The Big Nerd Ranch Guide: ➣ http://amzn.to/2jGADD6
-Head First Android Development: ➣ http://amzn.to/2jHAmQz

Best equipment for long hours of coding:
-Keyboard: ➣ http://amzn.to/2khXPvJ
-Mouse: ➣ http://amzn.to/2jFYBi7

My recording equipment:
-Microphone: ➣ http://amzn.to/2DxbW4A

Disclaimer: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂

Channel: Coding in Flow
Published: 2017-10-11 20:18:26
Duration: 3M22S
Views: 25484
Likes: 293
Favorites: 0

How to Add an Up Button to the AppBar – Android Studio Tutorial

In this tutorial we are going to implement an up/back button into our app, which navigates us back to our parent Activity. For this we have to make some small changes in our Manifest.xml file.

If you dont know, how to open a new Activity (for example by clicking a Button), watch this video first:
https://www.youtube.com/watch?v=bgIUdb-7Rqo

______________________________
Free 7-day trial for Treehouse courses:
https://treehouse.7eer.net/c/1141770/228915/3944

Great books to learn Android development:
-The Big Nerd Ranch Guide: ➣ http://amzn.to/2jGADD6
-Head First Android Development: ➣ http://amzn.to/2jHAmQz

Best equipment for long hours of coding:
-Keyboard: ➣ http://amzn.to/2khXPvJ
-Mouse: ➣ http://amzn.to/2jFYBi7

My recording equipment:
-Microphone: ➣ http://amzn.to/2DxbW4A

Disclaimer: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂

Channel: Coding in Flow
Published: 2017-10-11 22:42:33
Duration: 2M41S
Views: 3772
Likes: 82
Favorites: 0

Building a Simple Calculator using Android Studio

Basic Calculator to add, subtract, multiply and divide numbers in android
Check out the source code on: http://www.techobbyist.com
Download source code from github: https://github.com/mistermayne/basic-calculator
Channel: techobbyist
Published: 2015-04-18 17:34:12
Duration: 19M48S
Views: 240156
Likes: 695
Favorites: 0

Android Tutorial : ViewStub

Please watch: “Android Tutorial: Google Map Hello World”
https://www.youtube.com/watch?v=iHi3YbK3iGo
-~-~~-~~~-~~-~-

It’s a XML tag which inflate the layout at runtime on demand.

FPS Lib: https://github.com/friendlyrobotnyc/TinyDancer

Facebook Page : https://www.facebook.com/AndroidSchoolForDeveloper/

Channel: Android Developer School
Published: 2016-10-24 11:21:46
Duration: 15M2S
Views: 1730
Likes: 17
Favorites: 0

Leave a Reply

Your email address will not be published. Required fields are marked *