Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8168405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:30:40+00:00 2026-06-06T20:30:40+00:00

Currently I’m trying to implement something in my app where I really don’t know

  • 0

Currently I’m trying to implement something in my app where I really don’t know where to start.
Have a look at this little image:

enter image description here

You can find the app in play store here: https://play.google.com/store/apps/details?id=com.imano.euro2012.row

In my app, I have a listview and when i tap on an item I want to slide in the black activity in to about 3/4. In that activity I want to have some llistview item specific options.

Any one knows how to solve this?

Solution:

Thanks to Imran-Khan I got it working.
But I think this code is not perfect. I’m not sure if the width and height calculation in the first half of the showPopup() method is correct. And in my solution the popup has on the bottom and on the right a little margin. I don’t know right now why this happens. Maybe someone can help…

Here is what I did so far:

First I added the method showpopup(long selectedItem) to my listview:

lv_timer.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parentView, View childView, int position, long id) {
            showPopup(id);
        }
});

and the method itself:

private void showPopup(long selectedItem) {
    Display display = getWindowManager().getDefaultDisplay();
    Point size = new Point();
    display.getSize(size);
    int width = size.x;
    int height = size.y;

    int popupWidth = (width / 4) * 3;
    int popupHeight = height;

    LinearLayout viewGroup = (LinearLayout) findViewById(R.id.ll_timer_prop);
    LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View layout = layoutInflater.inflate(R.layout.timer_properties, viewGroup);

    final PopupWindow popup = new PopupWindow(this);
    popup.setContentView(layout);
    popup.setWidth(popupWidth);
    popup.setHeight(popupHeight);
    popup.setFocusable(true);

    popup.showAtLocation(layout, Gravity.NO_GRAVITY, width - (width / 4 * 3), 0);

    TextView tv_item = (TextView) layout.findViewById(R.id.tv_item);
    tv_item.setText("Clicked Item ID: " + selectedItem);
}

This is working fine for me.

for the slide in part I’ve found this thread: PopupWindow animation not working

I added

popup.setAnimationStyle(R.style.AnimationPopup);

before the showAtLocation() call, created a res/anim directory an created two XML files in it: popup_show.xml and popup_hide.xml

popup_show.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <scale
        android:fromXScale="0.0" android:toXScale="1.0"
        android:fromYScale="1.0" android:toYScale="1.0"
        android:pivotX="100%" android:pivotY="0%"
        android:duration="@android:integer/config_shortAnimTime"
        />
    <alpha
        android:interpolator="@android:anim/decelerate_interpolator"
        android:fromAlpha="0.0" android:toAlpha="1.0"
        android:duration="@android:integer/config_shortAnimTime"
        />

</set>

popup_hide.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <scale
        android:fromXScale="1.0" android:toXScale="0.0"
        android:fromYScale="1.0" android:toYScale="1.0"
        android:pivotX="100%" android:pivotY="0%"
        android:duration="@android:integer/config_shortAnimTime"
        />
    <alpha
        android:interpolator="@android:anim/decelerate_interpolator"
        android:fromAlpha="1.0" android:toAlpha="0.0"
        android:duration="@android:integer/config_shortAnimTime"
        />

</set>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:30:43+00:00Added an answer on June 6, 2026 at 8:30 pm

    You can create this view using custom PopupWindow

    see this tutorial for Creating Custom PopupWindow

    How to create popups in Android

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently I have this code: <?php echo '<meta name=robots content=noindex>'; $arr = json_decode(file_get_contents(http://media1.clubpenguin.com/play/en/web_service/game_configs/ paper_items.json),true);
Currently I am debugging the signing of an Android app. And this would be
currently I'm developing an app for WP7 but came across a little problem with
Currently, I have a GWT based application /app.htm It displays an openId login button
Currently I'm learning C++ and I've been trying to create a simple image processing
Currently, my ListViews look like this: How can I achieve that Windows 7 native
Currently I have this: var x = Convert.ToString(dateTimePicker2.Value.Subtract(dateTimePicker1.Value)); int xDays = Convert.ToInt32(x.Substring(0,1)); But it's
Currently I'am developing project on image processing on javacv. In that I have to
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.