How i can make widget like this in flutter? [closed] - android

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 days ago.
Improve this question
Hello guys I want to make a widget for banner Ad in flutter app like this picture
The user can hide it by click on it .
Thank you all
I want to find a widget in flutter library to do that work for me

you should try something and include its code, if it does fail, you're welcome to have it so the community will help you.
However, I can guide you about what you should combine in order to get it done, First, as you see that this banner should overflows on top of the screen layer, so you kindly want to use a Stack widget so it always stays on top of your app.
in the children of the Stack, you should include that banner widget, that banner widget should have a specific height, let's name it X then wrap it with the Positioned widget and set bottom: bottomValue,, where bottomValue os a declared double variable, with a default value to 0:
double bottomValue = 0;
you should have at this point a banner widget that is at the bottom of the screen.
You need now to change that banner widget so it includes also that drop-down icon that should be clickable, I will let the implement of this for you.
now, you need to manage the state of the moving up/down of the banner, this declares a new method that toggles the position of that banner between -X and 0:
togglePosition() {
setState(() {
if(bottomValue == 0) {
bottomValue = -X;
} else {
bottomValue = 0;
}
});
}
that's it, you will have a basic implementation for it, you can animate it using AnimatedPositioned or using a custom AnimationController.

Related

How to set toolbar title appear on scroll from bottom as it implemented in Apple Music Android app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to implement scroll behavior for Toolbar title as its implemented in Apple Music Android app.
Detailed screenshots of its behaviour:
Initial State,
Start scrolling,
Continue Scrolling,
End of scroll
Thank you in advance!
As Piyush said, https://github.com/brucetoo/Android-ObservableScrollView is exactly the library you need for this. This is how you'd go about it
Import the library by going to your app's Gradle file and pasting this
implementation 'com.github.ksoichiro:android-observablescrollview:1.5.0'
Make your xml layout and instead of using a standard ScrollView to wrap it, use an ObservableScrollView. Outside of the scroll view, make a toolbar that will host your menu buttons as well as the title i.e. "Library"
In you Java/ Kotlin file, attach a listener to the scroll view by using listView.setScrollViewCallbacks. Provide an object implementing the ObservableScrollViewCallbacks interface as an argument.
In the callback, change the YTranslation and alpha values of the title in your toolbar based on the scroll factor
I don't have android studio in front of me, so I can't provide any code, but this is the jist of it.

How to add an blocks in Android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create an landing view for my application a user log in they need to land on this activity page (Image 1) if they click on any of the icon they will be take to the activity page of that activity. I want it needed to be change when user turn their screen to vertical or horizontal. But I don't know where to start.
Below I have added two images to show what I want to implement in my application. This is for my college project. In the landing view it have alert box and another box text from MySQL database but I am stuck in all points.
Image 1
Image 2
what you need is a dashboard activity/ fragment...
something like this.
the rotation of the screen is not a big problem, in fact, with the sdk you can design your activities and define behaviours of completely other layouts depending on the screen size, orienttation etc...
The work to do is not complicated but you need to do couple of stuff first, (define some layouts, classese etc,)
my recomendation is to take a look at this tutorial, and develope your app by following this steps
1 -
you can do it by set ImageButton in your main layout when click in any image will open new layout
show this link is simple code but he use button you can make some code and use ImageButton not Button only convert type name from button to ImageButton
this is link= : https://stackoverflow.com/a/10936133/4967569
2 -
screen to vertical or horizonta
i think you need use any size by Formula "dp"
3 -
sorry i cant help you in Database I have No experience

How do I add an android pop screen in Unity3D [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm doing an android project with unity3D now.
I want to pop a small screen when I touch the button on the screen like the image below.
How could I implement this?
(My reputation is too low to post the picture)
http://i.stack.imgur.com/9SoLr.png
Design your popup with GUILabels and GUITextures. Create an empty gameobject called Popup, and place all these gameobjects under its hierarchy, and disable it in the inspector.
Make a new script attached to the button. In this script, create a public GameObject variable for your popup called popUp, and create a new function called OnMouseDown().
Within this function place the code
popUp.SetActive(true);
Finally, in the inspector, drag and drop the disabled gameobejct into the popup variable of your script, and it should work as you want.

xml layout in android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
So i'm having some issues with getting my application to look the way i want it to.
So the first issue i'm having is, i want to have small icons on the left side which is always visable to the end user. And they have the option to take it out (pull the icons to the right), and look what they do (i'll add text on the left side of the icons). What kind of view would i have to use?
Also whenever i try to make icons they always get a grey background eventhough i have transparent background in ps.
finally, how do i get a photo to show up from a website? i'll have my own database of photos i want to be shown, but how do i get those to appear? i tried things such as imageview, but that's something different..
Thanks in advance
For partially visible navigation drawer, follow the link : Android - How to implement a NavigationDrawer that is partially visible at all times?
For clickable icons, you are probably using android:src for ImageButton. Instead set image as android:background
For images to be loaded from the web, use WebView and simply using <img src="example.com/xyz.jpg"> will do the work.

How to create slider same as android inbuilt lock slider? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
i need creating slider same as like iphone or android inbuilt lock slider in home screen app. for this functionality i will use any inbuilt control or create custom layout for this. anyone has info. regarding this than pls send me any link or details.
You will have to make a custom slider:
Use a seekbar widget.
Then, on the onStopTrackingTouch listener, reset the seekbar position to ZERO unless the rightmost value has been reached. This will have a "snapping" effect. You can also code an animation to bring it back to the initial position smoothly instead of the "snapping" effect. If the rightmost value has been reached, you can do whatever you wanted to do.
You can use custom 9-patch graphics too!

Categories

Resources