Beispiel #1
0
    def __init__(self, context):

        LinearLayout.__init__(self, context)

        self.spriteAdapter = SpriteAdapter()

        self.grid = GridView(context)
        self.grid.setHorizontalSpacing(8)
        self.grid.setVerticalSpacing(8)
        self.grid.setNumColumns(3)
        self.grid.setAdapter(self.spriteAdapter)
        self.addView(self.grid)
Beispiel #2
0
    def __init__(self, context):

        LinearLayout.__init__(self, context)

        self.handler = None

        envDir = Environment.getExternalStoragePublicDirectory(
            Environment.DIRECTORY_DOWNLOADS)
        self.fileAdapter = SpriteFileListAdapter(envDir,
                                                 [".spr", ",ff9", ".ff9"])

        self.fileView = ListView(context)
        self.fileView.setOnItemClickListener(self)
        self.fileView.setAdapter(self.fileAdapter)

        self.addView(
            self.fileView,
            ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                                   ViewGroup.LayoutParams.WRAP_CONTENT))