Click here to Skip to main content
15,895,709 members
Articles / Mobile Apps / Android

Writing an Android GUI using C++: Part 4 - Activity

Rate me:
Please Sign up or sign in to vote.
4.76/5 (24 votes)
20 Jan 2014CPOL3 min read 102.1K   2.6K   81  
The example given in this article is similar to the previous article, except that it is written with C++.
/*--------------------------------------------------*/
/*VirtualSociety System Header File*/
/*CreateBy SRPLab                */
/*CreateDate: 2012-6-10  */
/*--------------------------------------------------*/
#ifndef VIRTUALSOCIETY_HEADERFILE_SRPWRAPANDROIDENGINE
#define VIRTUALSOCIETY_HEADERFILE_SRPWRAPANDROIDENGINE

#include <stdio.h>
#include <stdlib.h>
#include <vsopencommtype.h>
#include <vsopenapi.h>
#include <vsopensyseventdef.h>

#if( VS_OS_TYPE == VS_OS_WINDOWS )
#pragma warning (disable:4819)
#pragma warning (disable:4244)
#pragma warning (disable:4996)
#pragma warning (disable:4800)
#endif

#pragma pack(4)

/*++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*--Macro[Layout] Define */
#define WRAP_CONTENT                                      -2          
#define MATCH_PARENT                                      -1          
#define FILL_PARENT                                       -1          
#define METRICS_SP                                        2           
#define METRICS_PT                                        1           
#define METRICS_PX                                        0           

/*++++++++++++++++++++++++++++++++++++++++++++++++++*/
extern VS_UUID VSSTRUCTID_RectF;

struct StructOfRectF{
    VS_FLOAT        left;                         //
    VS_FLOAT        top;                          //
    VS_FLOAT        right;                        //
    VS_FLOAT        bottom;                       //
};



#pragma pack()

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions