Search Results

Search found 4 results on 1 pages for 'tanis draven'.

Page 1/1 | 1 

  • Scrolling RelativeLayout- white border over part of the content

    - by Tanis.7x
    I have a fairly simply Fragment that adds a handful of colored ImageViews to a RelativeLayout. There are more images than can fit on screen, so I implemented some custom scrolling. However, When I scroll around, I see that there is an approximately 90dp white border overlapping part of the content right where the edges of the screen are before I scroll. It is obvious that the ImageViews are still being created and drawn properly, but they are being covered up. How do I get rid of this? I have tried: Changing both the RelativeLayout and FrameLayout to WRAP_CONTENT, FILL_PARENT, MATCH_PARENT, and a few combinations of those. Setting the padding and margins of both layouts to 0dp. Example: Fragment: public class MyFrag extends Fragment implements OnTouchListener { int currentX; int currentY; RelativeLayout container; final int[] colors = {Color.BLACK, Color.RED, Color.BLUE}; @Override public View onCreateView(LayoutInflater inflater, ViewGroup fragContainer, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_myfrag, null); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); container = (RelativeLayout) getView().findViewById(R.id.container); container.setOnTouchListener(this); // Temp- Add a bunch of images to test scrolling for(int i=0; i<1500; i+=100) { for (int j=0; j<1500; j+=100) { int color = colors[(i+j)%3]; ImageView image = new ImageView(getActivity()); image.setScaleType(ImageView.ScaleType.CENTER); image.setBackgroundColor(color); LayoutParams lp = new RelativeLayout.LayoutParams(100, 100); lp.setMargins(i, j, 0, 0); image.setLayoutParams(lp); container.addView(image); } } } @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { currentX = (int) event.getRawX(); currentY = (int) event.getRawY(); break; } case MotionEvent.ACTION_MOVE: { int x2 = (int) event.getRawX(); int y2 = (int) event.getRawY(); container.scrollBy(currentX - x2 , currentY - y2); currentX = x2; currentY = y2; break; } case MotionEvent.ACTION_UP: { break; } } return true; } } XML: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" tools:context=".FloorPlanFrag"> <RelativeLayout android:id="@+id/container" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout>

    Read the article

  • MonoTouch & SQLite - Cannot open database after previous successful connections

    - by Tanis Draven
    I am having difficulty in reading data from my SQLite database from MonoTouch. I can read and write without any difficulty for the first few screens and then suddenly I am unable to create any further connections with the error: Mono.Data.Sqlite.SqliteException: Unable to open the database file at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x0007e] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:136 at Mono.Data.Sqlite.SqliteConnection.Open () [0x002aa] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:888 I ensure that i dispose and close every connection each time i use it but still i have this problem. For example: var mySqlConn = new SqliteConnection(GlobalVars.connectionString); mySqlConn.Open(); SqliteCommand mySqlCommand = new SqliteCommand(SQL, mySqlConn); mySqlCommand.ExecuteNonQuery(); mySqlConn.Close(); mySqlCommand.Dispose(); mySqlConn.Dispose(); I'm guessing that I'm not closing the connections correctly. Any help would be greatly appreciated.

    Read the article

  • Voice Control iOS

    - by Marc Tanis
    I would like to build a simple reader app for the iPad 2 that would allow users to navigate/read via voice controls. The app would allow the user to enter a mode where the microphone was live and listened for predefined keywords like 'down', 'up', 'next', 'back', 'home', etc. I don't want to reinvent the wheel on this so I'm just wondering first, if someone has done this already and if not, are there any good tutorials or SDKs available to help with recording someone's voice, and then comparing future output to see if it matches, or just dealing with the microphone in general?

    Read the article

  • What Is Causing The Humming Sound On My Website?

    - by Draven Vestatt
    I've noticed this on a handful of websites on the web. Sometimes there will be a low humming sound, that doesn't increase or decrease with volume. I've searched the web, and I can't find anything addressing it. My website that I've working on(still under construction): http://nottheactualaddress.com Do you hear a low humming sound? The audio is low even if you turn up your volume. If so, what do you think is causing it? It's driving me crazy...

    Read the article

1