android-layout

How to use LayoutInflater / ViewStub for an overlay

风流意气都作罢 提交于 2020-01-13 05:01:07
问题 As I am actually not very confident with programatically changing Views, I have following problem: At the first start of my app, I want to have an overlay for the main screen, that tells the user to have a look at the settings, as there are two critical options the user has to configure. I don't want to use an AlertDialog and rather not use a wizard. So, I decided to take an approach similar to Go SMS and create an overlay at the first start. The mockup I created looks like this: Normal menu:

adding tabs dynamically in android

三世轮回 提交于 2020-01-13 04:52:09
问题 in my application i want to add tabs dynamically ob click of button.how can i add? the rest gui shoul be same as it is.only tabs should be added. here is xml file- <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/Beige" android:focusable="true" android:orientation="vertical" > <LinearLayout android:id="@+id/linearLayout3" android

Change whole application's text color programmatically

我与影子孤独终老i 提交于 2020-01-13 04:44:06
问题 I would like to change the whole application's text and background color in Java, is this possible? With this I mean to change the color of every item in the application ( TextViews, ListView items, everything). Is this possible? I have tried using a custom-made style but I can't make it work. Here is the xml file (put in the res/layout/values folder): <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Light"> <item name="android:textColor">#00FF00</item> </style> </resources>

ExpandableListView / Drill-Down in Sliding Menu

喜你入骨 提交于 2020-01-13 04:13:30
问题 Here is the Current UI for Side Menu. Here is the image of an app with DRILL-DOWN or Expandable ListView Menu how to create same menu UI for the first image? 回答1: Looks like you've posted another similar question, where I've provided several links to tutorials and tips from my work with ExpandableListViews: Sub Menu in App Please let me know if there is any information you are still unclear on. 回答2: I already implementing expandable listview inside navigation drawer. This is full source code

Different tabMode for TabLayout

怎甘沉沦 提交于 2020-01-12 17:56:12
问题 I`m using ViewPager and TabLayout. If tabs can be placed on the display tabMode they must be: app:tabMode="fixed" else app:tabMode="scrollable" How can I do this? 回答1: I din't get your question but i may help you, if tabs count is static or fixed(you know number of tabs) then app:tabMode="fixed" if tabs count is dynamic(data coming from feed) then app:tabMode="scrollable" 回答2: If the problem is that for certain screen configurations (e.g. small screens, portrait config, etc.) the tabs need to

How to put AdView in ConstraintLayout at bottom and below other stuff?

ぃ、小莉子 提交于 2020-01-12 13:53:32
问题 I'm trying to migrate from RelativeLayout to ConstraintLayout but I'm having problems adding the AdMob AdView to the bottom and the rest of the content above it. For example, using RelativeLayout was that simple. You only need to put android:layout_alignParentBottom="true" on the AdView and android:layout_above="@+id/adView" on the view which is containing the stuff. I'm trying to understand how to migrate this sample code and these two lines of code to the equivalent using a ConstraintLayout

How to put AdView in ConstraintLayout at bottom and below other stuff?

耗尽温柔 提交于 2020-01-12 13:53:10
问题 I'm trying to migrate from RelativeLayout to ConstraintLayout but I'm having problems adding the AdMob AdView to the bottom and the rest of the content above it. For example, using RelativeLayout was that simple. You only need to put android:layout_alignParentBottom="true" on the AdView and android:layout_above="@+id/adView" on the view which is containing the stuff. I'm trying to understand how to migrate this sample code and these two lines of code to the equivalent using a ConstraintLayout

Button animations in android

我的梦境 提交于 2020-01-12 10:43:21
问题 Good day, everyone! Today I got, as I suppose, very interesting question. On my job we are creating a dating service and one of the main features will be the screen, where photos of different girls( or guys) are shown and the user press either "Hot" or "Not" button. Both of these buttons are displayed below the photo on the screen. Our analytics say (god "bless" them...) that we should implement some kind of "gaming" mechanics, so the want such a thing: when user press, for example, "Not"

ExpandableListView inside a scrollview

最后都变了- 提交于 2020-01-12 10:00:09
问题 In my app i want to make a page that have ExpandableListView and below him CheckBox. My problem is that my ExpandableListView is too big and make the CheckBox out of the page. On smaller screens is not visible at all. I tried to put ExpandableListView inside scrollview but its not working. Is there a way to make my design? Here is my code and a screenshot. XML code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout

Reset default values of Preference

我只是一个虾纸丫 提交于 2020-01-12 07:28:06
问题 I am using CheckBoxPreference for settings screen. The XML is: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <CheckBoxPreference android:key="includeAddress" android:title="Include Address" android:summary="" android:defaultValue="true" /> <CheckBoxPreference android:key="rememberName" android:title="Remeber Name" android:summary="" android:defaultValue="false" /> </PreferenceScreen> I change the values while in the