نوشته شده توسط : dotnek

There are different programming languages, each of which has its own fans and each has different features which is possible to use each of which in the right place by mastering them, so that you can take the advantages of them as good as possible, among these programming languages, we can mention JavaScript that gives you the opportunity to convert a content from static to dynamic and enable different users to interact well with the content which is somehow the key to success.In JavaScript, like all programming languages, there are various features that you can learn in order to produce valuable content, one of the features of this language is its libraries, among which we can mention jQuery, which we are going to discuss in more detail below.

What is jQuery?

It is so popular among programmers, in fact, it is a JavaScript library which allows you to navigate files and access predefined features easily, using it can give you the opportunity to perform lots of complex tasks with a few simple solutions, and there is no need to write lots of code lines in order to achieve your goal due to the fact that with just one line of code you can achieve the desired goals, jQuery also simplifies a lot of complicated things from JavaScript , like AJAX calls and DOM manipulation.

The structure of jQuery:

It consists of a JavaScript file that contains the basic functions of DOM, Ajax, events and effects, finally, in fact, it contains a wide range of application components that can be used to edit web project elements , with the help of this library, it is possible to make the changes you intend to make in the content, and through the JavaScript programming language, it is possible to do it in simpler ways instead of complex ways, jQuery also simplifies working with Ajax, this library optimizes site loading technology , especially if a browser interface is involved, with the help of it, Ajax can be quickly configured and used in various browsers and even older versions are covered, it can typically fill the gap between implementing JavaScript in separate browsers.In addition, when you can master it, you will eventually be able to execute all the commands you want by writing just one line of code instead of writing multiple lines of it.

jQuery Syntax:

This issue is very important and generally involves the selection of HTML elements that the purpose of selecting them is to make changes which will eventually make the content more attractive.

Basic syntax is:

$(selector).action()- A $ sign to define / access jQuery- A (selector) to "query (or find)" HTML elements- A jQuery action () to be performed on the element (s) 

Read more on:https://www.dotnek.com/Blog/Web/what-is-the-structure-of-jquery-and-how-to-se

link:https://dotnek.mystrikingly.com/

Related link:DotNek SEO



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 74
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

Today, the number of people who do all their tasks online is increasing day by day, and they try to save time by doing so, doing tasks online by different people have caused all businesses to create various sites in order to attract more users , WordPress is one of the site design systems that designers use to help sites to attract the attention of users and cause an increase in site traffic as well as site visits, as a result, the ranking of the website will be increased as well.The way to work with WordPress is very simple, and it can be said that this is one of the reasons for the great interest of various users in this system, along with many other reasons, in this article, we are going to look at how you can put a new post on your WordPress site , but before that, we need to give a general explanation about WordPress.

What is WordPress?

In general, it is an open-source content system which is available to various users for free, and they can use it to launch a personal as well as commercial website, as we have mentioned above, this system is an open-source one which means that site owners can use it in order to access its source code to view and modify it.

How to create a post in WordPress?

In WordPress, the posts which you upload are displayed on the home page or on the blog page and cause different users to be attracted to it, and when the posts which are uploaded are more attractive to the users, they will be more attracted to your site, which makes it possible for you to get closer to success step by step, in order to post in WordPress, you need to follow the steps which are mentioned in the following.- Before logging in to WordPress, you need to have high-quality content due to the fact that a good content can make the users stay on your website for a longer time, which cause Google to give a higher ranking to your website , that is in line with the topics on it as well as your field of activity.- After you have prepared good content and images that can attract users, you need to enter WordPress, and as you know, images are so important in attracting users because the appearance is as important as the content of a website, due to the fact that they can cause users to choose your website from other options.- Now log in to your WordPress Administration Screen (Dashboard)- In the dashboard section, click on the Posts option.- In the Posts tab, enter “Add New”.- By clicking on “Add New”, you can see a page where you need to fill in different items.- First, enter the title of your post in the title field at the top of the page.- In the larger box below the title box, enter the content of your post.- In the part where you enter your content, it is possible for you to add items that will cause your post and site to be seen more, one of the items that should be mentioned is linking keywords in the content to various pages and related blogs on your site, which can cause other pages of your site to be seen in addition to this existing content, in addition to this factor, there are other items that you can enter in order to add more power to your post. 

Read more on:https://www.dotnek.com/Blog/Web/create-a-new-post-on-wordpress-site-tutorial

link:https://dotnek.mystrikingly.com/

Related link:Vývoj mobilných hier



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 74
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

Among the various programming languages ​​that exist, Sass also has many enthusiasts who prefer to use it in order to be able to program faster, note that before you learn this language, you need to master HTML as well as CSS, which we are going to explain each of them briefly in the following section.Sass was designed by Hampton Kathleen and created by Natalie Wiesenbaum in 2006 and has attracted many users to this day, Sass stands for Syntactically Awesome Stylesheet , it saves time by reducing the repetition of CSS, which we are going to cover in more detail below as well.

What is HTML?

HTML stands for Hyper Text Markup Language ; it is actually a language that is often being used in the design of web pages, and in fact in this language all the code is converted to HTML and is being displayed by the browser.

What is CSS?

CSS stands for Cascading Style Sheets .In fact, it describes how HTML elements are going to be displayed on various sites, simply put, if you think of HTML as the skeletons of a human body, CSS can be thought of as the flesh and skin that ultimately make up a human appearance.It can be used to control the layout of multiple web pages at the same time , if you couldn’t use CSS or if it didn’t exist, you wouldn't even be able to imagine how ugly the web world would be, and users would definitely be tired of navigating it, and they would not be willing to spend long hours in it to get the answers they needed.

What is Sass?

It stands for Syntactically Awesome Style Sheets, with the help of which it is possible for you to create style sheets as soon as possible, and it also helps you to be able to keep everything organized, which you can do all of them with installing it quickly because in addition to the positive points which have been mentioned above, it also has more advantages that attracts lots of users to it.The important thing about it, is that it is compatible with all versions of CSS, the most direct way to make this happen is in your terminal, once Sass is installed, you can compile your Sass to CSS using the sass command, you will need to tell Sass which file to build from, and where to output CSS to, for instance, running sass input.scss output.css from your terminal would take a single Sass file, input.scss, and compile that file to output.css.So far, a question may come to your mind which is: why you should use Sass? We have answered this question in the following section in more detail.

Why should we use Sass?

The answer to this question is clear, all programmers are looking for a language that is able to provide them with more features, so it is enough to remind you that with the help of this language, you can take advantage of many features that you cannot do so in CSS. 

Read more on:https://www.dotnek.com/Blog/Web/how-to-work-with-while-for-and-switch-loop-co

link:https://dotnek.mystrikingly.com/

Related link:Search engine Optimization (SEO services)



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 55
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

that we need to be aware of, for this we must apply some special settings so that we can finally be informed of those events and happenings. The settings must be applied in such a way that the application is aware of the events and happenings that occur in some operating systems and responds to them appropriately, which is possible by using BroadcastReceiver components.

Here are the things we will learn in this tutorial:

- What is BroadcastReceiver?- How to implement BroadcastReceiver on Android - How to build a BroadcastReceiver - How to BroadcastReceiver- How to register a BroadcastReceiver in the manifest using the static method- How to record BroadcastReceiver in activity using dynamic method- What are the most important events of Android systems?- How to publish different types of messages in Android systems

What is BroadcastReceiver?

In order to be able to say what BroadcastReceiver is, we need to give you some examples. For example, suppose we want to create an application that must be connected to the Internet and is very dependent on the Internet, in this case, if the user is using the application and the application is not connected to the Internet must be Inform the user so that the user is informed that it is not connected to the Internet. In other words, it can be said that not connecting to the Internet must be notified to the user to take the necessary actions.In other examples and situations, consider that the user wants to use an application and using that application requires entering a verification code. Verification codes are sent via messages and users must enter them in the text box of the application after receiving it in order to be able to enter the application and use it. In this case, we should be able to be notified of events that occur in applications and operating systems so that we can apply settings that automatically enter the verification code sent in the text box without entering the user.To do this, we must be aware of the events that occur in the system so that we can finally make these settings, but we can also use BroadcastReceiver.

How to implement BroadcastReceiver on Android

1- We create a new project in Android Studio with the desired name BroadcastReceiver. It should be noted that the name of this project has been chosen arbitrarily in this BroadcastReceiver tutorial, and you can choose other names for this project.2- The activity used in this project must be of Empty Activity type.3- We need to create a BroadcastReceiver.4- It should be noted that in order to be able to create BroadcastReceiver , we must create a new class that inherits from BroadcastReceiver.5- Override the onReceive () method in this class so that we can receive the relevant messages.

Note:

Messages are received in intent format.6- I create a Java class inside the project with the desired name MyReceiver.7- The code that should be included in MyReceiver.java is as follows: 

Read more on:https://www.dotnek.com/Blog/Apps/what-are-broadcastreceiver-in-android-systems

link:https://dotnek.mystrikingly.com/

Related link:Which country has the best hackers?



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 53
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

Today, the number of users who do all their work online and use different sites is increasing day by day, due to this issue, there has been intense competition between the owners of different sites, and all of them are trying to provide the best site to their users that can provide users with more facilities and with the help of which they can easily meet their needs, as a result, jobs that do not have sites must felt threatened and tried to design their own sites so as not to lag behind competitors.There are many languages ​​for creating different pages and each of which have different features, so that programmers use them to create different sites according to their purpose, one of the most common languages ​​among programmers is Hyper Text Markup Language, which we are going to discuss in more detail below.

What is HTML?

It stands for Hyper Text Markup Language and gives the browser information about how to display content, so that it can accurately represent the goals of the site owner simply put, it consists of a series of elements that ultimately describe the structure of a web page , its elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc., now consider the following example.

<! DOCTYPE html>
<html>
<head>
<title> Page Title </title>
</head>
<body>

<h1> My First Heading </h1>
<p> My first paragraph. </p>

</body>
</html>

The result of the above example will be as follows.My First HeadingMy first paragraph.In general, in order to be able to learn the different programming languages that exist, the best way is to do this through the examples, for instance, pay attention to the example above, and then to the explanations in this section in order to learn all the things easily.

Example’s explanation:

- The <! DOCTYPE html> declaration defines that this document is an HTML5 document .- The <html> element is the root element of an HTML page.- The <head> element contains meta information about the HTML page .- The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab). - The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.- The <h1> element defines a large heading.- The <p> element defines a paragraph. 

Read more on:https://www.dotnek.com/Blog/Web/what-is-html-and-its-main-tags-for-site-desig

link:https://dotnek.mystrikingly.com/

Related link:DOTNEK BLOG



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 92
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

the user must clearly state his request. Slowly Use lifecycle and send your request to the application .

In this tutorial you will learn that:

- How to respond to different start, sleep or resume modes of the application - How to store different data in different lifecycle modes.

The requirements for doing this training are as follows:

- Install the latest version of Visual Studio 2019 on the system

- Install the latest version of Mobile development with .NET on the system

Learn how to respond to different modes of an application in Xamarin.Forms using Visual Studio

1- Open Visual Studio.2- After opening Visual Studio, you must create a new black Xamarin.Forms app.3- Choose a name for which you create. The name chosen in this article is AppLifecycleTutorial.

Note:

It is best to be careful in choosing names for projects and classes created.

Note:

The name chosen for the project must be the same as the name chosen for the solution, so choose the solution name AppLifecycleTutorial as well.4-  After naming, you must make sure that the system and application support the .NET Standard mechanism for shared code.This mechanism is used to share code written in Xamarin.Forms with the C # programming language. If your system and app do not support this mechanism, it cannot have multiple outputs on multiple platforms at once. So in order to be able to have multiple outputs on several different platforms at the same time, you need to make sure that your app and system support this mechanism.5-  Click on MainPage.xaml in the Solution Explorer section of the AppLifecycleTutorial project.6- Double click on App.xaml.cs.7- Update OnSleep, OnStart and OnResume overrides as below.

protected override void OnStart ()
{
Console.WriteLine ("OnStart");
}

protected override void OnSleep ()
{
Console.WriteLine ("OnSleep");
}

protected override void OnResume ()
{
Console.WriteLine ("OnResume");
}
By inserting this code, it replaces and updates the override method in the application lifecycle with the statement Console.WriteLine.- The OnStart method is invoked when the application starts.

- The OnSleep method is invoked when the application goes to the background.

- The OnSleep method is invoked when the application is restarted from the background.

Note:

There is no method to end the application.8- Press the start button or Ctrl + F5 key combination and see the result of the applied changes.9-  When the application starts, the OnStart method starts invoking and the result is displayed in the Visual Studio Output window. 

Read more on:https://www.dotnek.com/Blog/Apps/how-the-application-responds-to-user-requests

link:https://dotnek.mystrikingly.com/

Related link:how many apps in play store



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 58
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

Website design is being widely used, and many people are interested to work in this field, all of whom are definitely familiar with WordPress and use it to achieve their goals, as we explained to you in the articles on our site in this regard, the WordPress system has a lot of fans, and people prefer to use it due to the many positive points that this system has.Among all the positive points of WordPress, we have to mention some of them, including that it is easy to work with, it provides regular updates by its developers, and has many other positive features, all of which have led to an increasing number of people who prefer to use it.But the most important positive point that it has, is having high security and speed which is two factors that every website should contain, due to the fact that they can ultimately satisfy the users who use that website, and finally, they can gain a positive user experience which is considered as one of the ways to success for website owners because users will share their positive experience with their friends which will ultimately increase the traffic to that website .Here's how you can increase the speed and security in WordPress , but first we need to give you a general description of WordPress.

What is WordPress?

In general, WordPress is an open-source content system that is available to various users for free which can be used in order to launch a personal and even commercial website, as we mentioned, this system is open source which means that site owners can use it to access its source code to view and modify it.

How to improve and increase security in WordPress?

As we have mentioned before, WordPress is so popular among different people, and due to the great interest of different users in it, hackers also increase their activity in this field and do their best to be able to interfere with its security and steal information from different people, which is why the developers of this system regularly remind their users to minimize the entry of various hackers regularly, however, sometimes people face problems due to negligence and make their information available to profiteers, which can be very annoying and dangerous, here are some tips that you can follow in order to increase the security of the system to a great extent- One of the most important points to increase the security of a system is to install a suitable security plugin as soon as possible, you know for a fact that it is not possible for you to check the security of your site around the clock, and given that malware can enter the system and eventually compromise security, you should take action and try another solution which is using the tools available to help you scan the site 24 hours a day to avoid any risks from happening.One of the great security plugins that exists and is being used regularly by various users is Sucuri.net, which has many positive features, among which we can mention some of them including that it can be used to scan all malware remotely, Firewall, very effective security measures after hacking, etc., all of which can help you carry out your daily activities with peace of mind.- There is another point that observing it for all sites will increase the security of the system significantly, which is choosing a suitable and powerful password that may be ignored in some cases, despite the importance of this issue, and you should also try not to forget the password you have chosen, there is another point that should be considered which is not using a simple password such as your date of birth and so on, due to the fact that it allows hackers to access all the information on the site as soon as possible.As a result, it is necessary to choose a code that is a combination of uppercase, lowercase letters, numbers, symbols, etc., so that profiteers cannot easily guess it, simply put, the more complex the password you choose, the more time it takes to crack it, but if you choose a simpler one, it can be guessed and compromised in a short amount of time. 

Read more on:https://www.dotnek.com/Blog/Web/how-to-improve-and-increase-security-and-spee

link:https://dotnek.mystrikingly.com/

Related link:DOTNEK BLOG



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 102
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

- The "+" Symbol can have many uses, for example it may be used for Addition and Concatenation.While coding, it is possible to ignore whether a number is written as a string or not, which eventually leads to similarities, as a result, you cannot see the desired result.In fact, programmers may sometimes forget that the data which they have entered may be evaluated as a string, not a number, which can cause the data to join each other, as a result, no collective operations will be carried out. This mistake is very common, so that it is necessary to be careful in entering different data , so when needed, numbers are entered in strings, and otherwise they are entered numerically, now consider the following example for a better understanding. If you write out the code: var x = 10 + "7"; it goes up to "107,"As you can see, the numbers 7 and 10 are only joined together, and because 7 is written as a string, the two are not added together.- Confusing the assignment (=) and equality (==, ===) operators , each of these items need to be used in their proper place and have a different meaning, if you as a programmer, do not know where to use each of them, in the end you cannot do the right programming .When you want to compare two data, you need to use (==, ===) operators, the difference between the two is that three equals can make more accurate comparisons while two equals can perform a loose comparison in which only values ​​are compared and the datatype is no longer checked and compared, now consider the following example in this regard for a better understanding.

const number = "3";
console.log (number == 3);
// true
console.log (number === 3);
// false

In this example, the variable number was assigned a string value of 1, it returns true when compared with 1 (of number type) using double equals because both values are 1, but when compared using triple equals, it returns false because each value has a different data type.One of the inevitable mistakes that can occur is memory leaks, which you can prevent by being aware of the issue and the factors that cause it to take place, now note the following code:

var theThing = null;
var replaceThing = function () {
var priorThing = theThing; // hold on to the prior thing
var unused = function () {
// 'unused' is the only place where 'priorThing' is referenced,
// but 'unused' never gets invoked
if (priorThing) {
console.log ("hi");
}
};
theThing =
longStr: new Array (1000000) .join ('*'), // create a 1MB object
someMethod: function () {
console.log (someMessage);
}
};
};
setInterval (replaceThing, 1000); // invoke `replaceThing 'once every second


In order to understand everything better, you first need to know how things are working in JavaScript under the hood, the typical way that closures are implemented is that every function object has a link to a dictionary-style object representing its lexical scope, in a case that both functions defined inside replaceThing actually used priorThing, it would be important that they both get the same object, even if priorThing gets assigned to over and over, so both functions share the same lexical environment, but as soon as a variable is used by any closure, it ends up in the lexical environment shared by all closures in that scope, and that little nuance is what leads to this gnarly memory leak, in addition to this, there are other things that may eventually cause memory leaks that you need to be aware of in order to control them.- Another mistake that may be made by various programmers , especially beginner ones, is that they do not do any planning and research for coding and rush into the coding step, which in the end make them write the code without a plan which can cause many mistakes to occur.Before programmers start coding, it is necessary to carefully examine all the available items and check what input they need to have for the outputs which they are targeting, and then enter the coding stage, so that there is no need to rush.The steps that a programmer needs to take from the beginning include Writing, Validate, and Modified, and doing all the steps, respectively, can reduce the number of mistakes that a programmer may make while programming .

Read more on:https://www.dotnek.com/Blog/Web/the-common-mistakes-that-programmers-make-whe

link:https://dotnek.mystrikingly.com/

Related link:is https secure



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 71
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

If you also want to know more about the nature of game cheats and things related to them, follow me to the end of the article.

Most interesting cheats and game hacks and disadvantages of using them

Computer game cheating has become one of the most unfair and striking methods of earning points today. For those who are not into gaming and do not enjoy playing, resorting to various types of cheats and hacks will help them gain various points unfairly and by breaking a large number of rules. So, if you are using a cheat code you are breaking the rule while other people are trying to score points fairly in a game. However, using various cheats while playing can be exciting and make it easier for you to play, but it is a big violation of the law and also prevents you from becoming a professional in a game . So, try to avoid cheating codes as much as you can so that you can score points morally in a game. Note that if your goal is to play just for fun, it may not be a problem to use cheat code, but if you want to become a professional gamer, do not even think about using cheats.

What are game cheats and what they do?

Now that we have talked about the legality of cheat hacks, let's take a look at what fraudulent codes are and what they do. Cheats is usually the code that you can use to get the desired score without any hassle instead of playing and trying to get points with the game cheat. To get these codes, you can enter certain letters and numbers in the game, or you can perform certain actions during the game to earn coins by cheating. When you obtain these codes by performing different actions during the game, the use of cheating codes is questioned a bit, as in this case the codes are hidden by the game maker in the game, and legally, the game maker has permitted you to do so. However, if you want to become a professional gamer , it is better to stop using these codes. You can use game cheats to perform various actions such as using a shortcut to go through various levels, reach a certain space, and find a strange ability. Note that cheat codes are not unwanted and are intentionally generated. Note that some cheats sometimes make the game steps more difficult, which game designers have used to challenge gamers with these codes. Note that the codes are not just for fun, but in some cases for testing different steps. In many cases, these codes are the only means of monetization, and the game developers themselves have made them so that they can continue to sell them to players to earn a lot of money. However, buying and selling these codes is completely illegal, but they are used in large numbers around the world, and it has caused many people around the world to go through the stages of a game without any problems, while others have been able to try their best to succeed in a game. However, the use of cheating codes in some cases can make the competition more exciting, so we can look at these codes as a positive tool too.

Consequences of using a cheat code

Note that the cheating code has more disadvantages in addition to the ones we mentioned earlier. We told you earlier that some of these codes may have been created to challenge players, we do not intend to talk about these codes in the following; In this article, we have discussed the codes that make the game steps easier. Using these codes will create an unfair system for competition that can even threaten the life of the game. In this context, many people who are playing fairly may be lost to those who have reached higher levels by cheating, and this may reduce a player's taste. Cheaters can win easily and without any problem by using a few codes. As a result, this will cause frustration and discouragement for real players, which will ultimately lead to the demise of a game in an unhealthy competitive system. Note that it can cost a lot to build a game, which can be eliminated with just a few codes and distributed among players. So, game developers must be aware of the fact that the popularity and fans of the game may be lost due to the existence of several cheating codes.

 

Read more on:https://www.dotnek.com/Blog/Games/most-interesting-game-cheats-and-game-hacks

link:https://dotnek.mystrikingly.com/

Related link:click here



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 68
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
نوشته شده توسط : dotnek

As their name suggests, the hide button is a float that is placed on the page when designing or developing an application -by-application designers and developers, and of course, it should be noted that by scrolling the page, they do not move and remain on the page. Of course, the choice of their location is the responsibility of the developers. These types of buttons are mostly used in messaging applications or their management such as Gmail. In this part of the tutorial, we want to tell you about how to create floating buttons. The Gmail page has a circular icon at the bottom right of the page with a pencil mark inside. Pressing this button will take you to the email page and write a new message.FAB stands for Floating Action Button, which requires some libraries to launch and run, such as appcompat and design.1- I will create a new project in Android Studio and we will choose a name for it. The name chosen for this project in this part of the tutorial is FAB.2- Remember that we must create the project with MinSDK 17.3- We add the library to the project. Like the following:

dependencies {
implementation fileTree (dir: 'libs', include: ['* .jar'])
implementation 'com. android. support: appcompat-v7:27.0.2'
implementation 'com. android. support:design:27.0.2'
}
In this project we use CoordinatorLayout for layout. It should be noted that the reason for using this layout is that you can use it to have better management and controls.

<? xml version = "1.0" encoding = "utf-8"?>
<android. support. Design. widget. CoordinatorLayout
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: app = "http://schemas.android.com/apk/res-auto"
xmlns: tools = "http://schemas.android.com/tools"
android: layout_width = "match_parent"
android: layout_height = "match_parent"
tools: context = "com.dotnek.fab. MainActivity">


</android. support. Design. widget. CoordinatorLayout>
Convert the activity_main.xml to CoordinatorLayout using the code listed above.4- Add a FloatingActionButton tag to android. Support.Design. widget. FloatingActionButton.

<? xml version = "1.0" encoding = "utf-8"?>
<android. Support.Design. widget. CoordinatorLayout
xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: app = "http://schemas.android.com/apk/res-auto"
xmlns: tools = "http://schemas.android.com/tools"
android: layout_width = "match_parent"
android: layout_height = "match_parent"
tools: context = "com.dotnek.fab. MainActivity">

<android. Support.Design. widget. FloatingActionButton
android: id = "@ + id / fab"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "bottom | end"
android: layout_margin = "16dp"
android: src = "@ android: drawable / ic_dialog_email" />

</android. support. Design. widget. CoordinatorLayout>
The above code defines two values for layout_gravity. Bottom and end value. layout_margin also specifies the amount of distance it should have from the page, and the standard value to be included in the attribute is 16dp.5- We will implement the project.6- After executing the project, we will see that the button with the icon that we have defined will be displayed at the bottom right.7- If we want to move the floating button to the left, we must define layout_gravity as follows:

android: layout_gravity = "bottom | start"

8- start is opposite to end, which means the beginning of the screen.9- We will run the project again.10- FAB background color is received and determined by default using colorAccent.11- In order to be able to change the background color, we must also change the property of app: background Tint. Like the following:

 

Read more on:https://www.dotnek.com/Blog/Apps/what-are-floating-buttons-in-android-systems

link:https://dotnek.mystrikingly.com/

Related link:DotNek IOS Vývoj



:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 89
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()