Mobile Development Articles

Page 41 of 156

How can I set an icon for my Android application?

Azhar
Azhar
Updated on 03-Jul-2020 4K+ Views

This example demonstrates how set an icon for my Android application .Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Further follow the path to reach the desired folder to add icon (app → res → mipmap).Step 3 - Add you app icon. You can just simply copy and paste the image in mipmap folder.Step 4 - After placing the image in the mipmap folder. You need to rename the default icon name to your icon image name.Step 5  − Add the following ...

Read More

How to change the position of the dialog on Screen android?

Azhar
Azhar
Updated on 03-Jul-2020 2K+ Views

This example demonstrates how do I change the position of the dialog on Screen in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.javaimport android.app.AlertDialog; import android.content.DialogInterface; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Gravity; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       AlertDialog.Builder builder = new AlertDialog.Builder(this);     ...

Read More

How to overlay two images in Android to set an ImageView?

Azhar
Azhar
Updated on 03-Jul-2020 3K+ Views

This example demonstrates how do I overlay two images In Android to set an ImageView.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Copy and paste two images which you want to overlay(Merge) in the res/drawable Then Create a drawable resource file (layer.xml) and add the following code,         Step 3 − Add the following code to src/MainActivity.javaimport androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; ...

Read More

How to create a Dialog Box without a title in Android?

Azhar
Azhar
Updated on 03-Jul-2020 300 Views

This example demonstrates how to create a Dialog Box without a title in Android.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/layout/activity_main.xml.                 Step 3  − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class Dialog extends AppCompatActivity {    Button ...

Read More

How to change action bar size in Android?

Azhar
Azhar
Updated on 03-Jul-2020 3K+ Views

This example demonstrates how to change action bar size in Android.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/values/styles.xml                     @color/colorAccent       @color/colorPrimary       @color/colorAccent       36dip     Step 3  − Add the following code to res/layout/activity_main.xml.     Step 4  − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends ...

Read More

How to create Android Hello World App?

Azhar
Azhar
Updated on 03-Jul-2020 482 Views

This example demonstrates how to create Android Hello World App.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/layout/activity_main.xml.     Step 3  − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);    } }Step 4  − Add the following code to Manifests/AndroidManifest.xml           ...

Read More

Android bundle to pass data between activities?

Azhar
Azhar
Updated on 03-Jul-2020 323 Views

This example demonstrates how to pass data between activities.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/layout/activity_main.xml.                           Step 3  − Add the following code to res/layout/activity_second.xml.               Step 4  − Add the following code to src/MainActivity.javapackage com.example.sample; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import ...

Read More

How do I create a transparent Activity in an Android App?

Azhar
Azhar
Updated on 03-Jul-2020 2K+ Views

This example demonstrates how to create a transparent Activity in android.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/values/styles.xml.               #33000000       true       @android:color/transparent       @null       true       @android:style/Animation     Step 3  − Add the following code to res/layout/activity_main.xml.         Step 4  − Add the following code to src/MainActivity.javapackage com.example.transparentactivity; import android.support.v7.app.AppCompatActivity; ...

Read More

How to read value from string.xml in Android?

Azhar
Azhar
Updated on 03-Jul-2020 2K+ Views

This example demonstrates how to read value from string.xml in Android.Step 1  − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2  − Add the following code to res/values/strings.xml    Sample    Test string Step 3  − Add the following code to res/layout/activity_main.xml     Step 4  − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);    } }Step ...

Read More

How to customise iOS button to set text and color?

Sadiqaadil
Sadiqaadil
Updated on 03-Jul-2020 2K+ Views

In this post we will be seeing how to customise iOS button.So let’s get started.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “CustomiseButton”Step 2− Open Main.storyboard and add a button as shown below. We will customize this buttonThere are two ways to customise this buttonUsing StoryboardStep 1 − Click on the buttonStep 2 − In the right panel, in the attribute inspector you can change the text color, text and background color of the button as shown belowRun the project you will see the customise button as belowNow we will see the ...

Read More
Showing 401–410 of 1,551 articles
« Prev 1 39 40 41 42 43 156 Next »
Advertisements