Taking Screen Shots

by Joseph Arceneaux » Tue, 03 Mar 2009 01:59:04 GMT


Sponsored Links
 Does anyone know how to generate a screen shot on the G1?  Also, where this
sort of basic user information might be documented?
Thanks,
Joe

--~--~---------~--~----~------------~-------~--~----~



Taking Screen Shots

by Mark Murphy » Tue, 03 Mar 2009 02:03:14 GMT


 


I do not believe there is a means do to this on the device itself.

The development tools that accompany the SDK (namely DDMS) allow you to
take screenshots of an attached device.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Taking Screen Shots

by Michael Martin - MM Agency » Tue, 03 Mar 2009 02:21:22 GMT


 This is explained at
 http://www.mobilecrunch.com/2008/10/31/how-to-capture-the-screen-of-an-andro 
id-device/


Michael Martin
 http://www.googleandblog.com/ 

-----Original Message-----
From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Monday, March 02, 2009 10:03 AM
To: android-beginners@googlegroups.com
Subject: [android-beginners] Re: Taking Screen Shots





I do not believe there is a means do to this on the device itself.

The development tools that accompany the SDK (namely DDMS) allow you to
take screenshots of an attached device.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Multi-touch MotionEvent pointer IDs changing over time

Hi!

I am trying to track multiple touch points over time and according to
the documentation to do this I should:
"Use the getPointerId(int) method to obtain a pointer id to track
pointers across motion events in a gesture"

Now after long experiments I simply replaced my own touch handling
with this simple "dump" routine to see what's going on:

int count = event.getPointerCount();
for (int p = 0; p < count; p++) {
       Log.i("APP"," Pointer: " + event.getPointerId(p) + " " +
event.getX(p) + " " + event.getY(p));
}

Now I place 2 fingers on the screen and use a third that I
continuously lift and put back down again onto the screen without
lifting the first two. Say I get the pointer ids 0 and 1 for the first
two and the above loop then shows an id 2 for the third one. Strange
thing now is that after a couple of times of doing this, suddenly the
routine above shows me pointer ids 0 and 2 for the first two and the
third touch becomes 1 as if the pointer ids are not actually
persistent over time?

Anyone else experience something like this?.
Seeing this on an HTC Desire HD running Android 2.2.1

Thanks,
rob.

-- 

2. Custom ListView does not show

Hello everyone,

first, I'm very sorry, if I'm in the wrong group for my question.
I have a Problem with my custom Listview. I created a Activity and an
appropriate xml-file with a ListView for the settings of my
application. Source Code comes below. Also I created a custom Layout
file for the rows, which contain a Textview and a Checkbox. The
settings it self are stored serialized in the filesystem and where
picked up, when the settings view is called. Perhaps thats not the
best Option, but that is not causing the problem i have.
In the List layout there is also a textview available as a header.
Now, when the settings are called, I just see the reader, the
remaining screen stays simply black. I tried to give the list another
background color, but the screen stays black.

Code from the Activity (onCreate method):
        public void onCreate(Bundle icicle)
        {
                userSettings = deserializeObject();

                if(userSettings.isEmpty())
                {
                        userSettings.add(new SettingItem("Camera",
android.os.Environment.DIRECTORY_DCIM, true));
                }
                super.onCreate(icicle);
                super.setContentView(R.layout.list);
                Context mContext = this.getApplicationContext();
                settingsList = (ListView)findViewById(R.id.settinglist);
                CustomSettingsAdapter setAdap = new 
CustomSettingsAdapter(mContext,
userSettings);
                settingsList.setAdapter(setAdap);

                settingsList.requestFocus();
                settingsList.requestFocusFromTouch();

Code from the CustomSettingsAdapter:
public View getView(int position, View convertView, ViewGroup parent)
{
          ViewHolder holder;
          if (convertView == null)
          {
                  convertView = mInflater.inflate(R.layout.settings_item, null);
                  holder = new ViewHolder();
                  holder.txtName = (TextView)
convertView.findViewById(R.id.setting_name);
                  holder.cb = (CheckBox) convertView.findViewById(R.id.check);

                  convertView.setTag(holder);
          }
          else
          {
                  holder = (ViewHolder) convertView.getTag();
          }

                
holder.txtName.setText(settingsArrayList.get(position).getName());
                
holder.cb.setChecked(settingsArrayList.get(position).getState());

                return convertView;
         }

XML-File of the list:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
        <TextView android:id="@+id/settings_list_title"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:text="@string/settings_header"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:gravity="center" />
        <ListView android:id="@+id/settinglist"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#aaaaaa" />
        </LinearLayout>

XML-File of the rows:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
                xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="4dp">
        <LinearLayout
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="2dp">
                <TextView
                        android:id="@+id/setting_name"
                        android:textSize="18sp"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content">
                </TextView>
        </LinearLayout>
        <LinearLayout
                android:orientation="vertical"
                android:gravity="right"
                android:layout_gravity="right"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:padding="2dp">
                <CheckBox
                        android:id="@+id/check"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content">
                </CheckBox>
        </LinearLayout>


Thank you very much in advance for your help!
Greetings Tobi

-- 

3. Peculiar behavior with Matrix class

4. Sharing Data between applications

5. HELP: Retrieve USSD Message

6. Any problem with the HTC Inspire??

7. Service shouldn't unbind after rotation.