How to implement 'BottomNavigation' element in a nativescript application? - android

I have a working project written with angular nativescript, and now i want to add some tabs using 'BottomNavigation'. I looked in the documentation and it seemed pretty simple, but when i added the code to my project all of the tabs just overlayed on each other and i didn't saw any tabs, as if i just put the pages one on another. What am i missing? What should i do in order to use bottom navigation? I tried to create a new helloe world project and just add the bottom navigation but i got the same result. However, when i created a 'tabs' project it did had proper tabs.
I suspect its have somthing to do with the {N} version. I recently updated to the latest version (8.1.5) and there are a lot of troubles with it. Does bottom navigation still supported on this version? How can i make it work?

Well, i found the solution. In case someone in the future will face the same problem:
It is a version problem. Since version 8 you should add the package manualy as described here:
https://github.com/nativescript-community/ui-material-components/tree/master/packages/bottom-navigation#installation

Related

Are "spinner" and "expandableListView" items present in Android Studio 3.5.3

Good day to everyone! This is my first question :)
I am a beginner to Android Studio and I'm trying to write some code for an app. Surfing the web I've found videos showing interesting features about spinner and expandableListView that I'd like to use in my application. The problem is I can't find these items no matter what.
I have an android studio 3.5.3 version and the videos I saw showed versions 1.some.some and 2.some.some. Can anyone help me out with this, please?
Here an image about the palette I have in the android studio.
If you want to use lists in general you should use RecyclerView instead. You can still find now and then applications that use Spinners (they are under containers not widgets). – DemoDemo

Layout broken by instant app API?

I am working on an instant app demo app. I used the default template which I extended with a RecyclerView and a custom adapter. My problem is that my layout is totally broken:
As you see the toolbar is the same, but something does not work correctly regarding the coordinator layout. The floating action button is missing and the navigation drawer is not displayed below the system UI (the notification area) and yep of cause the menu is empty.
The both screens are debug builds so proguard is not messing anything up (I got also release working with proguard, but of cause I still have the same issue). On the left is the result of the gradle task :app:assembleDebug and on the right :instantapp:assembleDebug.
Since I use except of the recycler view the default template for this app I add no code, any idea why my layout is broken in instant apps?
Please follow these steps and you should be good to go!
https://developer.android.com/topic/instant-apps/getting-started/first-instant-app.html
Note : Please select Navigation Drawer Activity in Step 8
From the shared image, it looks like you have modified some code from the default Navigation Drawer Activity for your IA. If yes, please share the code to investigate.
Also, let me know the device/emulator and the Android studio you are using. I was not able to reproduce the issue with Studio version 3.0.1 on Nexus 5x (Android version 8.0.1). Following is the image of the instant app from my nexus 5x with 8.0.1 build. Let me know if I am missing something!

StatusBar overlaps NavigationPage on Android from Xamarin.Forms 2.3.4

As shown in the image, when updating Xamarin forms from the latest 2.3.3 version to the first 2.3.4 version, the statusbar overlaps the navigation bar. This behaviour ist still there in current version 2.4.0.38779. No code was changed between those both images despite the Xamarin.Forms update.
I use a MasterDetailPage, where the detail part contains a navigation page with a ContentPage inside. No custom stuff, just the default pages.
I cannot find any issues relating this nor any breaking changes documented explaining this change in behaviour.
For me it seems the correct display is the variant in version <2.3.4. Or is the new display correct and I have to set some flag to pull the navigation bar beneath the statusbar?
PS: I use Prism.Forms as framework.
UPDATE: Problem is solved in Xamarin 3
ORIGINAL:
To answer my own question:
Unfortunately this is not possible at the moment:
There is a pull request regarding the issue: PR
And a renewed Pull request:
https://github.com/xamarin/Xamarin.Forms/pull/1287
The bug report: Bugzilla
Thread from BjornB who suggested the PR: Xamarin Forum

Confused with MainActivity.java in android studio

I'm fairly new to java and android studio in general,and I'm trying to follow a tutorial on YouTube on how to make a simple android calculator by Andy York. I made it to part 2 of 2 until he started coding in MainActivity.java, when I noticed that ours were different and that I have stuff like "FloatingActionButton"and "SetSupportActionBar" which he doesn't have and which is confusing because if erase those then everything will mess up. I think it may have been because of an Android Studio update since his video? I'm trying to make everything neat like his but I don't know how. I hope this makes sense and any help would be appreciated. Thanks.
When creating new project in Android Studio use "Empty Activity" template instead of "Basic Activity". The "basic" one does add a lot of things, like a floating action button, which often isn't helpful.
Those are coming because you select a that theme. So, Select the Empty Activity. Then nothing will make problem .

Android ActionBarCompat Not working from the start

OK, I have been wanting to try the new ActionBarCompat, however, I am not able to run my programs in the emulator.
I have been trying to implement the following: http://antonioleiva.com/actionbarcompat-how-to-use.
and have been stuck on basically the first part. However, working with the author of that content, I was able to get further as I was not adding the project under sdk\extras\android\support\v7\appcompat folder like stated. However, I still think that might be the reason I cannot do this...
More detail can be found here: http://antonioleiva.com/actionbarcompat-how-to-use/#comment-43
Basically, on my first attempt, I just created an Android project, and changed the source code as indicated. Code would not run on the emulator. So I went back to the original code, and that ran on the emulator.
Checked online, found out I might need to add the \extras\android\support\v7\appcompat folder as a library to the project I am building. So I added that and a new android project was created. There were build errors from the start, but I failed at trying to add it as a library to my project, and deleted it....thinking this was way overboard.
After back and forth chats with author of linked website, I found out I had to do that overboard thing.
So I tried the following link to the T: (I cannot post more than 2 links due to low repuation...I will add this link as a comment below)
However, Eclipse would not allow me to add the appcompat Existing Android Project...but it did allow me to add the appcompat Existing (General) Project. I think this may be some of the problems??
Right now, I cannot run the project at all. Eclipse is showing a red exclamation mark on the project folder, but all the code seems to be fine. So I don't know what to do now...I recreated this project several times over, and this one was the one where I knew what to do...and I am still getting problems
So...
I decided to move to Android Studio...updated the IDE, updated the SDK manager to include the new support library, and other things. Created a new project, added to the build.gradle file as shown in the link provided below in the comment. I ran the ant build, and then built the project...tried to import the right things to allow ActionBarActivity, but I could not get that far.
I can import
"android.support.v7.*"
"android.support.vy.R" // and all folders within
but nothing allows me to add ActionBarActivity, and I don't know why.
FYI, I guess I would prefer a solution to Ecplise, as it seems like I actually got somewhere with it.
The best example to use is from here, and I would follow it closely. I had similiar issues when I first came across this. Problem was I misunderstood what I needed to do
http://developer.android.com/tools/support-library/setup.html#libs-with-res

Categories

Resources