• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

worldsproject/android-jigsaw-puzzle-library: Jigsaw Puzzle Generator for Android

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

worldsproject/android-jigsaw-puzzle-library

开源软件地址(OpenSource Url):

https://github.com/worldsproject/android-jigsaw-puzzle-library

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

An Android library that facilites the creation of Jigsaw puzzles.

All code is GPLv3

How do I create puzzles with the puzzle library

So, you have the puzzle library as an eclipse project, and it's built all properly, with no errors.

  1. Mark the project as a library

    • Right click on the puzzle library.
    • Click properties
    • Go to Android.
    • Scroll Down and check "Is Library"
  2. Create a new application. This will be your future puzzle app.

    • File > Other
    • New Android Application
    • Give it a name, such as "MyPuzzle"
    • Build SDK should be API 16 and minimum SDK should be API 8
    • Click next until you can click finish.
  3. Tie in the Puzzle Library to your new app.

    • Right click on MyPuzzle
    • Click properties
    • Go to Android
    • Click Add...
    • Select the puzzle library.
    • Click Okay
  4. Add new images for your puzzle

    • Create a new folder in res called "drawable-nodpi"
    • Add your puzzle images to this folder.
    • As an example we will use "image1" and "image2"
  5. Edit MainActivity to create the puzzle.

    • Delete the created method onCreateOptionsMenu
    • Your onCreate method should look like:
super.onCreate(savedInstanceState);
		
    int[] mImageIds = { R.drawable.image1, R.drawable.image2, };
		
    Intent intent = new Intent(this, PuzzleSelectActivity.class);
    intent.putExtra("images", mImageIds);
		
    this.startActivity(intent);
  1. And you should add the following to your manifest:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
<activity android:name="org.worldsproject.puzzle.PuzzleSolveActivity" >
</activity>
 
<activity android:name="org.worldsproject.puzzle.PuzzleSelectActivity" >
</activity>

You should be able to run MyPuzzle and it will display the two images as available puzzles.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
h5p/h5p-editor-php-library发布时间:2022-08-15
下一篇:
altair-viz/altair: Declarative statistical visualization library for Python发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap