Autocomplete when editing android layouts in Visual Studio with Xamarin

I'm currently running a latest Xamarin.Android trial installation with up-to-date Visual Studio 2012.When opening .axml file in visual studio I can see a visual designer and can use it normally, when I switch to the "Source" tab I can see a perfectly fine layout xml with syntax highlighted and whatnot.The problem is, that auto-complete can only suggest XML comment and CDATA elements, nothing else.Is there a way to turn android-aware auto-complete in Visual Studio? I recall Xamarin Studio being able to auto-complete layouts, but when opening a s...Read more

When creating my own View in Android, the bottom area where the context menu inflates is Black. How can I fix this?

<FrameLayout xmlns:android="" android:layout_width="fill_parent" android:layout_height="fill_parent"> <test.viewz.MazeView android:id="@+id/mazeView" android:layout_width="fill_parent" android:layout_height="fill_parent" /></FrameLayout>So this is supposed to create a 3x4 grid and I have the sizing work out fine (to the best of my knowledge) but no matter what I have tried changing, I can't seem to get the Canvas to paint in the bottom section of the scree...Read more

android layout - Codename one form appearance changed

Is there any change in CN1 default theme?Here is my form what it was looking prior on the phone (it has list item background and square button by default)Then all of a sudden from last 2 days, without changing anything in themes.res from my side, list item background and button shape have disappeared & button caption became all caps. As per thisThis happened across the whole app and all of my 4 apps. Please may I know is the change going to be revert from the CN1 side or this is an enhancement?...Read more

Remove default value of Spinner Item in Android

I have a Spinner loaded with data from a database.Unfortunately, every time the android activity (inside which the spinner exists) begins, the first item of the spinner gets selected automatically by default.Is there a way to prevent this i.e. I don't want the first item of the spinner to get selected automatically unless and until selected by the user. In fact, I don't want any of the item to get selected until one being selected by the user. How can this be done?Update 1:I noticed something peculiar. When beginning an activity containing a Sp...Read more

android layout - How to have dynamic width for a group of views in react native?

I am learning React Native and in the process am trying to achieve a layout design which will have 8 views in a row whose width should be automatically adjusted based on the width of the device.I am experimenting with some boilerplate code from . With my changes the code looks like this:export default class FlexDirectionBasics extends Component { render() { return ( // Try setting `flexDirection` to `column`. <View> <View style={{fl...Read more

How to fit layout in 2 devices with same DPI (320dpi) and different resolutions

I made a simple layout after reading Android documentation. My problem is the following : I have 2 devices with same DPI ( 320dpi ) and different resolutions, 1200x1920 and 800x1280. I would fit my layout so that it will be good in both devices. Screenshots :1200x1920 : : it could help I used dpi buckets; 120dpi,160dpi etc.....Read more

android ImageView scaling to fit another View

I have a relative layout that comprises a TextView and an ImageView: <RelativeLayout xmlns:android="" xmlns:tools="" android:layout_width="match_parent" android:layout_height="wrap_content" <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android...Read more

getText from one layout and (setting it) setText in an other layout

i call this method SolveUpdation (from button- onclickAction Listener) from mainAcitivity with main layout. i use other layout to get value from user and set it as button title in the main layout and that is only instruction that does not works for me private void SolveUpdation() { //this function call is generated from the main Activity with main layout setContentView(R.layout.updateappliance); //this is 2nd layout to get values from user and use them as buttonText in the main layout btnSaveApp = (Button) findVi...Read more

android layout - recycler View Item it is not showing Ripple effect/touch highlight, i applied Listener by using gesture Detractor

recyclerView.addOnItemTouchListener(new MyListClickListener(getContext(), new MyListClickListener.ClickListener() { @Override public void onClick(View v, int position) { TextView textView = (TextView) v.findViewById(; Fragment fragment = ((MyPagerAdapter) viewPager.getAdapter()).getFragment(1); FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.detach(fragment); fragment.onDestroy(); ft.attach(fragment); ft.commit(); ...Read more

android layout - AppCompat Light DarkActionBar Text color

I am trying to set the Action Bar text color to black in a Theme.AppCompat.Light.DarkActionBar, but the text color stays white.Below is my styles resource <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:windowBackground">@android:color/white</item> <item name="android:act...Read more

android layout - Inflate multiples views into a fragment

I was working on my app and i need to make a list of little groups of views like this : (i couldn't post my image 'cause StackOverflow thing i'm not famous enought)IMAGEThe fragment is shown , and correctly applied but the view group that i'm trying to display doesn't.I can't find how to make my fragment apprear and make the buttons work (But that's not the point now , so I'll ask the question later)class EditFragment : Fragment() {lateinit var option : Spinnerlateinit var result : TextViewprivate lateinit var viewOfLayout: Viewoverride fun onC...Read more

what element type and layout for should I use for app landing page navigation buttons?

I'm pretty new to Android Development, i'm following some Youtube tutorials currently. I'd like to create a basic mobile tourist application, but i'm stuck as to how to create the main menu layout.Each Favorite 1 - 3, and Options 1 - 9 should be icons. (I'm not sure which form element should be used for this).QuestionHow can I create the favorite, and option icons in the layout.xml file, what element is best suited, and what layout(s) should I use?In HTML, i'd create a table with 3 columns, 4 rows and set the table width and height to be 100%, ...Read more

android layout - ScrollView overlapping other content in RelativeLayout

I have a drawer menu defined for my app that uses a RelativeLayout as its root.The general structure of the menu is as follows:<RelativeLayout xmlns:android="" xmlns:app="" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:importantForAccessibility="no" android:orientation="vertical"><LinearLayout android:id="@+id/linear_vert_drwr_hdr" android:lay...Read more