popupwindow

Properly creating a fragment in a PopupWindow

我是研究僧i 提交于 2019-11-28 19:33:02
I’m new to Android development and am confused about how to accomplish what I’m trying to do. I’ve done some reading and learning about fragments so I can share layout and code between various screen size designs. I’ve got a couple of fragments created and have used them successfully. But I’ve got a situation where I want to show a fragment in a normal activity on the phone, but want to show the fragment in a PopupWindow (or something similar if there’s a better choice) on a tablet. I’ve managed to figure out how to inflate the fragment and display it in a PopupWindow when a button is clicked.

自定义时间选择器

非 Y 不嫁゛ 提交于 2019-11-28 16:22:16
/** * 时间选择器 * */ public class DatePicker { private Context mContext; private SparseArray<View> mViews; private int mlayoutResId; private PopupWindow popupWindow; private View vPopupWindow; List<String> textList1 = new ArrayList<>(); List<String> textList2 = new ArrayList<>(); List<String> textList3 = new ArrayList<>(); List<String> textList4 = new ArrayList<>(); private int year; private int month; private int day; private String time; private int hour; private int howday; private String week; private int minute; private WheelView wheelView1; private WheelView wheelView2; private WheelView

Android进阶之绘制-自定义View完全掌握(三)

て烟熏妆下的殇ゞ 提交于 2019-11-28 15:08:21
自定义View系列的第三篇博客,我们来学习如何实现自定义下拉框。 今天的程序,我们来实现这样的一个效果。 布局非常简单,我们直接开始编码。 修改activity_main.xml文件的代码。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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.itcast.test0430.MainActivity"> <EditText android:id="@+id/et_input" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="middle" android:hint="请输入内容..." android

Browser window popups - risks and special features

◇◆丶佛笑我妖孽 提交于 2019-11-28 12:28:58
1. What exactly is the security risk with popups? The new browsers provide settings to block window popups (on blocking, sites with active popups display a message to user). What exactly is the security risk with popups? If allowing popups can execute something dangerous, then the main window can too. Is it not the case. I think I don't know about some special powers of window popups. 2. Any special features of popup windows? Take for example the HDFC bank netbanking site . The entire netbanking session happens in a new window popup and a user neither manually edit the URL or paste the URL in

Popup before window is closed

烈酒焚心 提交于 2019-11-28 11:51:09
问题 I want to open a custom popup box when browser close button is pressed, I want to ask a question to the users exiting that why are they leaving my site. I have checked quite few posts but the best thing I found is something like this post http://stackoverflow.com/questions/10847156/jquery-dialog-box-before-closing-browser-window But this just opens a browser default confirm box. I want to open a custom box like colorbox. My page is http://cwstudio.in/browserclose/ right now I am using alert

Switch to popup windows in cucumber, capybara

时光毁灭记忆、已成空白 提交于 2019-11-28 07:31:27
问题 In RSpec i can use such code switch to popup window, link, How can i do such thing in Cucumber steps? login_window = page.driver.find_window('PPA_identity_window') main_window = page.driver.find_window('') # We use this to execute the next instructions in the popup window page.within_window(login_window) do #Normally fill in the form and log in fill_in 'email', :with => "<your paypal sandbox username>" fill_in 'password', :with => "<your paypal sandbox password>" click_button 'Log In' end 回答1

Popupwindow with image

大城市里の小女人 提交于 2019-11-28 07:01:47
I need to be able to click an imgview in a listview , which should open a popup showing the image fullsize. I've managed to implement the clicklistener , but keep failing at creating the popup, even with just a testing textview . In my mainActivity oncreate i run lstView.setAdapter(new CustomListViewAdapter(this, dataFromDBListe, 0, orientation)); In my CustomListVievAdapter, where i have my clicklistener (which can display a toast at the moment) I have the following getView() : public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null)

How to make Twitter app style Quick Actions on Android

假装没事ソ 提交于 2019-11-28 06:51:48
Is there any code that gives an example about how to implement the Quick Actions and Popdown menu that is displayed in the Twitter for Android app? Funny you should ask that as I just have happened to finish working on this exact thing. You can check out the code here simple quickactions for android 来源: https://stackoverflow.com/questions/3113106/how-to-make-twitter-app-style-quick-actions-on-android

ViewPager with Fragments inside PopupWindow (or DialogFragment) - Error no view found for id for fragment

强颜欢笑 提交于 2019-11-28 05:49:17
I created a FragmentActivity with this code below public class Activity_principal1 extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_principal1); List<Fragment> fragments = getFragments(); AcoesMuscularesAdapter ama = new AcoesMuscularesAdapter(getSupportFragmentManager(), fragments); ViewPager vp_contentAcoesMusculares_SequenciaExercicios = (ViewPager) findViewById(R.id.vp_contentAcoesMusculares_SequenciaExercicios); vp_contentAcoesMusculares_SequenciaExercicios.setAdapter(ama); }

Can android PopupWindow show another PopupWindow?

让人想犯罪 __ 提交于 2019-11-27 23:45:12
Can android PopupWindow show another PopupWindow? How many PopupWindow can be opened in the same time? Only one? The first PopupWindow is displayed normally. But on button click (which is in the first PopupWindow contentview) i am having an exception: 08-13 16:28:38.682: ERROR/AndroidRuntime(11760): FATAL EXCEPTION: main android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@41286250 is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:600) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java