How To Use Image Button With Android Studio To Do Anything
HTML-код
- Опубликовано: 20 авг 2024
- How To Use Image Button With Android Studio To To Anything
Donate me:
Paypal: paypal.me/fine...
Binance Pay ID: 253333352
==============================
Follow us Links:
Instagram: / fine_gap
Facebook: / finegap
Whatsapp: +923041100028
================================================
Disclaimer
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research, Fair use is a use permitted by copyright statute that might otherwise be infringing, Non-profit, educational, or personal use tips the balance in favor of fair use.
Some photos in the video are free-to-use photos downloaded from pixabay.com. The picture used in this video is protected by the Fair Use Law, section 107 used for commentary, criticism, news reporting, or education for transformative use.
The video Has been made for available informational and educational purposes only, Everything in this video is based on information we learned from online resources, our own experience, and books we have read.
#image #androidstudio #androidstudiotutorial
Spot on, just what I needed
thanks
Keep making these type of small concept videos
sure, don't forget to subscribe me. :)
Awesome bro!! It really helped my with my project 👍
Welcome and don't forget to subscribe me :)
thanks my brother.
You are welcome & don't forget to subscribe me :)
Thank you anna❤
Your are welcome & don't forget to subscribe me :)
Thank you so much for this video
Welcome and don't forget to subscribe me
1:44
My image have transparent bg but in the android studio it has gray bg how to make it transparent?
android:background="?android:attr/selectableItemBackground"
Thank you ❤
More than welcome, & don't forget to subscribe me.
Thanks Broo
Welcome & don't forget to subscribe me :)
How do you make an image button when once clicked on will redirect you to another activity page?
You just need to call a function on that image button click and use the below code
in CurrentActivity write your activity name
Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class);
myIntent.putExtra("key", value); //Optional parameters if you want to put some data to another activity
CurrentActivity.this.startActivity(myIntent);
@@finegap I made it work by just following the same steps as a normal button but adding an image to it and now when i run it works and redirects to another activity page when clicked. Is this fine or does it have to be the imageButton way?
my button is not coming in the center of the app. using constraint layout, i placed it at center but in app it doesn't work. do you know why? :(
need to check the code
@@finegap nvm, it worked! i changed my layout to frame instead since it's easier. thanks for reply anyway! :)
Can we make it circular?
yes
bro agar hum chahty hu k click krne pa button pa pic change hu jae tu o kase huga
yes easily possible.
sor plz ap aik button bna dy or us m click kry tu pic show ho
sir plz ap NY sb ko reply dia plz MRA paper plz reply kr dy is p ik video bna dy plz plz
XML
SCSS
Button openImageButton = findViewById(R.id.open_image_button);
Java
openImageButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file:///android_asset/my_image.jpg"), "image/*");
startActivity(intent);
}
});
Вместо картинки серый фон получился
это не важно, но спасибо
How to remove the edge of image button transparent
you can remove the edge of images with an online tool remove dot bg
use android:background="@null"
thanks@@eccentr3c.