---
title: "Display a Toast message in the top of the page in my android application"  
description: "Display a Toast message in the top of the page in my android application"  
author: "Anonymous User"  
published: 2015-01-23  
updated: 2015-01-23  
canonical: https://www.mindstick.com/forum/12895/display-a-toast-message-in-the-top-of-the-page-in-my-android-application  
category: "mobile development"  
tags: ["android", "java"]  
reading_time: 1 minute  

---

# Display a Toast message in the top of the page in my android application

I m using the following line to make a [Toast](https://www.mindstick.com/forum/13002/how-to-short-time-of-toast-notification) [message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net) displayed in my [android application](https://www.mindstick.com/forum/33405/how-to-get-the-build-version-number-of-your-android-application)

Toast.makeText(InitActivity.this, InitActivity.this.getResources().getString(R.string.invalid_pin_code), Toast.LENGTH_SHORT).show();

But this message is displayed in the bootom of the page.

**And I want to display it below an EditText in my page.**

How to make that?

## Replies

### Reply by Anonymous User

You need add this as programmatically like this in your code:

toast.setGravity(Gravity.TOP|Gravity.LEFT, 0, 0);


---

Original Source: https://www.mindstick.com/forum/12895/display-a-toast-message-in-the-top-of-the-page-in-my-android-application

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
