Search Results

Search found 1353 results on 55 pages for 'orientation'.

Page 34/55 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Android: Constructing a triangle based on Geographical information

    - by Aidan
    Hi Guys, I'm constructing a geolocation based application and I'm trying to figure out a way to make my application realise when a user is facing the direction of the given location (a particular long / lat co-ord). I've got the math figured, I just have the triangle to construct. Here's a further clarification of what I want to do.. I just want to know is there a way to get java to construct 2 other co-ordinates based on my orientation in relation to true north and my current co-ordinate? I'd like to construct a tri-angle, 45 degrees out each way of my current location (one of the points) and 1 kilometer in that direction. The problem is I don't know how to make Android/Java recognise that I want to find that point in the direction I'm currently facing.. Anyone got any ideas?

    Read the article

  • What would you do if you coded a C++/OO cross-platform framework and realize its laying on your disk

    - by Manuel
    This project started as a development platform because i wanted to be able to write games for mobile devices, but also being able to run and debug the code on my desktop machine too (ie, the EPOC device emulator was so bad): the platforms it currently supports are: Window-desktop WinCE Symbian iPhone The architecture it's quite complete with 16bit 565 video framebuffer, blitters, basic raster ops, software pixel shaders, audio mixer with shaders (dsp fx), basic input, a simple virtual file system... although this thing is at it's first write and so there are places where some refactoring would be needed. Everything has been abstracted away and the guiding principle are: mostly clean code, as if it was a book to just be read object-orientation, without sacrifying performances mobile centric The idea was to open source it, but without being able to manage it, i doubt the software itself would benefit from this move.. Nevertheless, i myself have learned a lot from unmaintained projects. So, thanking you in advance for reading all this... really, what would you do?

    Read the article

  • iPad UISPlitViewController Common View

    - by saikamesh
    is it possible to have a common view for both master and detail view controllers. What if I need to add a header image(at top, the very first view) common for both the master and detail view controllers. When the device is in the portrait mode the width of the header image view has to shrink to fit to the detail view controller's view and when the orientation changes to landscape the width of the same header image view has to be expanded that is the width of it has to be 1024. Please tell me whether doing this is possible. or any workaround for this?

    Read the article

  • Android 4.0.3 OpengL ES 2.0 issue

    - by user1662184
    i develop live wallpapers using Opengl ES 2.0 engine. My wallapapers run smooth on 2.x Android Devices , but in 4.03 i see some strange things. 1st seconds (maybe a minute max) lwp runs smooth , but after that starts dropping frames especially when objects passing near camera allmost crashes. But no error on eclipse Log. I watched Eclipse log from the begining of loading the lwp to the point of dropping frames. I ve seen that on My LG optimus 2X , and my Samsung Galaxy S2. Any Idea what to check , or what is going on?? UPDATE i just noticed that changing render mode from dirty to continuously fixed the problem , but until screen orientation changes , or goes of and on. after that renderer freaks out.

    Read the article

  • set map in google maps with TimerTask

    - by Chad White
    I would like to change the Position of the map in google maps v2 But Ive done it in a TimerTask ... target, zoom, bearing and so on and it says "IllegalStateException - not on the main thread What should I do? Any help? class Task extends TimerTask { @Override public void run() { CameraPosition cameraPosition = new CameraPosition.Builder() .target(Zt) // Sets the center of the map to Mountain View .zoom(12) // Sets the zoom .bearing(180) // Sets the orientation of the camera to east .tilt(30) // Sets the tilt of the camera to 30 degrees .build(); // Creates a CameraPosition from the builder mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); } } Timer timer = new Timer(); timer.scheduleAtFixedRate(new Task(), 0, 20000);

    Read the article

  • IOS SDK : first advices for beginners

    - by VdesmedT
    I too often answer the same kind of questions regarding basic topics like memory management, UITableView, Interface Orientation, MVC, etc... I understand very well that everyone starting with that SDK is too exited about getting its hand on it but a few reading would save them hours of debugging and the frustration that come along with the feeling that "We miss something here". I'd like experience users to share the few small articles, white papers, docs, book chapters that helps other save their time and avoid frustration. My first vote would be for : IOS Memory Management Guide View Controller Programming Guide Table View Guide And as a General recommendation, read the Overview section that come along with every class documention in the reference library, they contains most of what you need to know to avoid big traps !

    Read the article

  • WFP Validation & IDataErrorInfo

    - by Jefim
    A note - the classes I have are EntityObject classes! I have the following class: public class Foo { public Bar Bar { get; set; } } public class Bar : IDataErrorInfo { public string Name { get; set; } #region IDataErrorInfo Members string IDataErrorInfo.Error { get { return null; } } string IDataErrorInfo.this[string columnName] { get { if (columnName == "Name") { return "Hello error!"; } Console.WriteLine("Validate: " + columnName); return null; } } #endregion } XAML goes as follows: <StackPanel Orientation="Horizontal" DataContext="{Binding Foo.Bar}"> <TextBox Text="{Binding Path=Name, ValidatesOnDataErrors=true}"/> </StackPanel> I put a breakpoint and a Console.Writeline on the validation there - I get no breaks. The validation is not executed. Can anybody just press me against the place where my error lies?

    Read the article

  • How do I change the URL Alias for Security/login in SilverStripe to user/login

    - by pthurmond
    I am working on a new website being built in SilverStripe. Currently I am having a ton of trouble trying to get the system to let me change the URL alias (or create a second one) for the Security controller's login (and eventually logout) function. I have tried playing around with the routes.yml file and I tried creating the paths in my own UserController and loading directly from the Security controller with "return Security::login()". But that gives me errors about the use of the static functions. Unfortunately I don't come from a ton of object oriented experience and this is the first CMS I have used that actually uses a bunch of true object orientation. The current version of SilverStripe we are using is 3.0 (but we will be upgrading to 3.1.1 in a few days). Does anyone know much about the routing in SilverStripe?

    Read the article

  • Tag property null when data binding

    - by rotary_engine
    Can anyone see what is wrong with this? The Tag property is returning null however the Binding for Id property is definately returning an int value. <ListBox ItemsSource="{Binding ElementName=myDomainDataSource, Path=Data}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Id, Mode=OneWay}" /> <HyperlinkButton Content="Edit" Tag="{Binding ElementName=Id, Mode=OneWay}" Click="Edit_Click" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> and then... private void Edit_Click(object sender, RoutedEventArgs e) { ContentControl c = sender as ContentControl; // exception - c.Tag is null int id = (int)c.Tag; } The Id property is showing a value on the UI, but doesn't seem to be getting stored in the buttons Tag property.

    Read the article

  • "No XML content. Please add a root view or layout to your document."

    - by ez4nick
    I am trying to follow this tutorial : http://developer.android.com/training/basics/firstapp/building-ui.html as I am new to android developing and this is what my "activity_main.xml" file looks like : <?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="fill_parent" android:orientation="horizontal"> <EditText android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" /> When I click run I get an error that says "No XML content. Please add a root view or layout to your document." and I noticed there is a new file generated called "activity_main.out.xml". What could I be doing wrong?

    Read the article

  • Android: how to make two TextViews placed in different lines if there is no enough space in one line

    - by bluebyte
    I'am trying to organize two TextViews to behave like that: So, if there is enough space for both TextViews in line, android should place them in line. If there is no enough space, the second TextView must be placed on a next line with right alignment. <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/takeoffCity" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/flightItem" /> <TextView android:id="@+id/landingCity" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/flightItem" /> </LinearLayout> <style name="flightItem" parent="@android:style/TextAppearance"> <item name="android:textSize">14dip</item> <item name="android:textColor">@color/flightItemFont</item> <item name="android:scrollHorizontally">true</item> <item name="android:textStyle">bold</item> </style>

    Read the article

  • Regarding Standard Oxford Format for vlfeat sift

    - by Karl
    One of my upper classmen has gave me a data set for experimenting with vlfeat's SIFT, however, her extracted SIFT data for the frame part contains 5 dimensions. Recall from vl_sift function: [F,D] = VL_SIFT(I) Each column of D is the descriptor of the corresponding frame in F. F normally contains 4 dimensions which consists of x-coordinate, y-coordinate, scale, and orientation. So I asked her what is this 5th dimension, and she pointed me to search for "standard oxford format" for sift feature. The thing is I tried to search around regarding this standard oxford format and sift feature, but I got no luck in finding it at all. If somebody knows regarding this, could you please point me to the right direction?

    Read the article

  • unconventional sorting in excel

    - by I__
    i have a list like this: G05 G03 F02 F06 G10 A03 A11 E10 E05 C11 C03 D03 A12 C12 F05 H03 C08 G02 D10 B12 C10 D11 C02 E11 E02 E03 H11 A08 D05 F04 A04 H07 D04 B07 F12 E04 B03 H05 C06 F08 C09 E08 G12 C04 B05 H09 A07 E09 C07 G07 G09 A06 D09 E07 E12 G04 A10 H02 G08 B06 B09 D06 F07 G06 A09 H06 D07 H04 H10 F10 B02 B10 F03 F11 D08 B11 B08 D12 H08 A05 i need it sorted in the following manner: A03, B03, C03....A04, B04, C04.....A11, B11, C11........ the conventional sort can be done like this: ActiveWorkbook.Worksheets("2871P1").Sort.SortFields.Add Key:=Range("D20:D99") _ , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("2871P1").Sort .SetRange Range("D20:E99") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With however with this method, we are going to get A01, A02, A03 etc..., but this is not what i need

    Read the article

  • How can we add scrolling text in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method I wrote the code, UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • Phonegap 2.1 for Android - Hello World App 3 errors at launch

    - by noway
    I developed something with Phonegap for iOS, but this is my first trial for Android. I created my hello world application with CLI sth like this mentioned here: $ /path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName Even though I created this app in Eclipse Workspace, I needed to import it to Eclipse. I created two AVDs. One for API level 8, one for API level 16. When I try to build, it gives me these three errors and a warning. What is wrong with my setup? Description Resource Path Location Type error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 20 Android AAPT Problem error: No resource identifier found for attribute 'xlargeScreens' in package 'android' AndroidManifest.xml /com.example.test.testprojectname line 22 Android AAPT Problem error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|keyboard|screenSize|locale'). AndroidManifest.xml /com.example.test.testprojectname line 51 Android AAPT Problem The import android.app.Activity is never used testprojectname.java /com.example.test.testprojectname/src/com/example/test line 22 Java Problem

    Read the article

  • How can we make the text to appear in landscape mode in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • wpf: How to keep an image stay in its original size?

    - by Martin Luo
    hi, guys! i have a problem about the image display in wpf. here's my code <Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5"> <Button.Content> <StackPanel Orientation="Horizontal" Margin="10,0"> <Image Source="/images/user_add.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" /> <TextBlock Text="??" /> </StackPanel> </Button.Content> </Button> i hava the image with original size 32*32, but when i ran the above code, the image will stretch to fill all the space, beyond its original size, and i also set the "Stretch" property to "None", but it seems that it doesn't work. so, how can i fix this problem? thank u~~~!

    Read the article

  • Problem with align button in treeview in wpf

    - by phenevo
    Hi, I've got something: <HierarchicalDataTemplate DataType="{x:Type MyService:Country}" ItemsSource="{Binding Path=ListOfAreas}"> <StackPanel Orientation="Horizontal"> <TextBlock TextAlignment="Center" Text="{Binding Path=Name}"/> <Button Name="MyButton" Height="20" Content="Add Area"></Button> </StackPanel> </HierarchicalDataTemplate> It works, but not nice way, because I want to have TextBox at middle hight of button. Now it is at top hight of button. for example: NOW: MYTEXTBOX |||||||||||| ||Add Area|| |||||||||||| Expected result |||||||||||| MYTEXTBOX ||Add Area|| ||||||||||||

    Read the article

  • How to add Ads for my android app using eclipse?

    - by user3896367
    I am trying to add ads to my app but I don't know how I followed the instructions from this site: https://developer.android.com/google/play-services/ads.html I did step 1 and 2 in the getting started column, I imported the google-play-services_libs to my workspace then I referenced it in my app and I added this code in my mainfest: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> I opened the sample ad and copied this code to my xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/black" android:gravity="center" android:orientation="vertical" > <com.google.android.gms.ads.AdView android:id="@+id/adView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" ads:adUnitId="@string/ad_unit_id"/> but I am getting this error: The following classes could not be instantiated: - com.google.android.gms.ads.AdView so do you know how to fix this problem and can you tell me what should i write in the java to make in work thanks

    Read the article

  • Need to change layout of radio buttons! help needed

    - by James
    I've got 2 radio buttons and i want to put them next to each other. Right now theyre like Radio button 1 Radio button 2 i want to make it Radio button 1 Radio button 2 This is my code for the radio buttons, any help? <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RadioButton android:id="@+id/radio_male" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Male" android:layout_below="@id/gender"/> <RadioButton android:id="@+id/radio_female" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Female" /> </RadioGroup>

    Read the article

  • How to set an ImageView and two TextviewS to have the same height?

    - by M.ES
    I've got the following layout with one ImageView and 2 TextView, I would like them all to have the same height. However, the ImageView is always taking more than half of the screen. Any help is highly apreciated. Here is the layout: <?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="fill_parent" android:background="#FFFFFF" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.4" android:src="@drawable/sprint" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.3" android:background="#555555" android:text="@string/hello" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0.3" android:text="@string/hello" /> </LinearLayout>

    Read the article

  • Which type of data can be garbage collected when app is in background?

    - by Neoh
    Let's say I start from activity A - activity B. While in activity B I press home to exit. After a long time, gc may be called because other apps take higher priority. My question is, which of the following type of data will be garbage collected (I'm pretty sure static fields can be garbage collected any time but I'm not sure about these): i) fields that are declared final or static final ii) intent and its data that I passed from activity A to activity B iii) onSavedInstanceState when orientation is changed during the app running I ask this because I want to ensure that my app won't crash when I restore activity B from background after a long period.

    Read the article

  • Fragment savedInstanceState is always null (Android support lib)

    - by Evgeny Egorov
    I wrote a simple test project, but I cant understand why I always receive savedInstanceState = null in lifecycle methods onCreate, onCreateView and onActivityCreated. I change the screen orientation, see the log, but state not saved. Tell me please where is my mistake. Thanks. The code of fragment class is: public class TestFragment extends Fragment { private String state = "1"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (savedInstanceState != null) { //never works state = savedInstanceState.getString("state"); } //always prints 1 Toast.makeText(getActivity(), state, Toast.LENGTH_SHORT).show(); return inflater.inflate(R.layout.fragment_layout, container, false); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString("state", "2"); Log.e("", "saved 2"); } }

    Read the article

  • Android, how to make two buttons next to each other with the same width

    - by user3674127
    Im trying to place two buttons on the xml next to each other and I want them both to be the same size(half from the width of the screen) - this is my xml: <LinearLayout android:layout_width="fill_parent" android:orientation="horizontal" android:id="@+id/linearLayout2" android:layout_height="fill_parent" android:gravity="bottom" android:weightSum="2"> <Button android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/bAddDelete" /> <Button android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/bMainMenu" /> </LinearLayout> Everything works well, but when im changing the text in java, the width is changing, how can I make them the same size? Thanks

    Read the article

  • Why Camera.setParameters(Camera.Parameters) has no effect on Sony-Ericsson X10 and Droid?

    - by mobilekid
    Has anyone come across a strange behaviour with the Camera API when used on Sony-Ericsson X10 or Droid? For example the following code doesn't work on those devices. As a result I'm getting a lot of negative feedback on the Market translating into many cancelled orders... mParameters.set("rotation", orientation); mParameters.set("jpeg-quality", img_quality); mParameters.set("picture-size", "1024x768"); mCamera.setParameters(mParameters); Could you suggest an alternative way of achieving the same? Thanks.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >