android-xml

How to inflate a view behind another

戏子无情 提交于 2020-01-05 08:43:13
问题 Forgive me if this is a simple question however I am new to Android Development and this problem has been bugging me. I have a "base" layout file which contains a RelativeLayout and a com.devspark.sidenavigation.SideNavigationView from this library. I then have an activity with a ViewPager which inflates other layouts (containing ListViews and progressBars) into this. My issue is that however I try and do it, the SideNavigationMenu always appears behind the inflated listviews. I'm not sure

Android : Permission Denied Error when changing Launcher Activity

家住魔仙堡 提交于 2020-01-04 02:54:18
问题 I have an android app that I am trying to launch and it gives me the error java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hoosierag/.MainActivity } from null (pid=32395, uid=2000) not exported from uid 10125 I get this error when I try to change the launcher activity in the manifest. Also I dont get this error when I launch it on the emulator, but when I try to launch it on a device

How to Increase the size of Image View in Android

偶尔善良 提交于 2020-01-03 15:20:09
问题 I am working on a project that requires me to implement two horizontal scroll views with an image view in between them. I would like to extend the size of the image view to fill up the gap in between the scroll view. I went through the sample code, but it doesn't seem to mention anywhere in the size of the image view. I've enclosed the code below after the Image describing my problem. public class Gallery2DemoActivity extends Activity { private Gallery gallery,gallery1; private ImageView

text for marquee dynamically

一个人想着一个人 提交于 2020-01-03 12:45:21
问题 Is it possible to add text from java coding of a list view to marquee scroll in Android. If yes can you please let me know how? If needed I shall post the code used. This was the XML for listview used is as follows <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <LinearLayout android:id="@+id/linearLayout1" android:layout

Checkbox and radio buttons

て烟熏妆下的殇ゞ 提交于 2020-01-03 09:08:15
问题 Do checkboxes have the permission to behave like radio buttons.I am developing a quiz application where in the options have the behaviour of radio buttons and the icon of the options are to be like the checkbox and is it possible for me to group the checkbox as we group radio buttons? 回答1: I don't know if this is the best solution but you can create a "manager" for your checkboxes, and run it whenever any of them gets clicked. For simplicity I've added the manager in the xml code, but feel

How can I write android binary XML from Android App?

蓝咒 提交于 2020-01-03 00:45:40
问题 I've got an app that pulls XML from the Web, and caches it locally. As parsing XML is expensive compared to parsing Android binary XML, I'd like to store my local copy as Android binary XML. I haven't spotted an API for creating Android binary XML on the fly though, only the C/C++ code used by AAPT. My motivation for taking this approach is that I don't currently use all the XML values/attributes, but may want to use more of them in a future version of my app, and don't want to download all

Using AppCompat Toolbar with FrameLayout

房东的猫 提交于 2020-01-02 07:32:10
问题 So my XML goes like this: <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v7.widget.Toolbar android:id="@+id/my_toolbar" android:layout_height="56dp" android:layout_width="match_parent" android:minHeight="?attr/actionBarSize" android:background="?attr/colorPrimary" /> <FrameLayout

Sliding animation having multiple views synchronization issue

天涯浪子 提交于 2020-01-02 05:04:15
问题 I am trying to make an animation with two textviews. Both are in a relative layout. The functionality of the animation is left textview will go little bit left and at the same time right textview will also go little bit left. I have tried: http://nineoldandroids.com/ and default way. But for both case I am getting a gap during the process. I already put one question but i am not getting any positive reply: Android slider animation is not synchronized Nineoldandroids code: xml file:

android button with half circle edges

微笑、不失礼 提交于 2020-01-02 03:06:48
问题 I am trying to create a shape to be used for my imagebuttons in my Android project that would essentially have half circles for the left and right sides. I thought I could just use a shape XML with a radius, but that just rounds the corners where I need the whole left and right sides to be half circles like the image below. My current XML for the shape looks like this: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=

android: how to add children from an xml layout into a custom view

坚强是说给别人听的谎言 提交于 2020-01-02 01:18:29
问题 In my xml layouts I have a custom view in which i will put some children like: <com.proj.layouts.components.ScrollLayout android:id="@+id/slBody" android:layout_width="700dp" android:layout_height="400dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="child1"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="child2"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap