Giter Club home page Giter Club logo

imagetag's Introduction

ImageTag

Tag images as you like

Drawing

<akilus.com.imagetagger.ImageTagger
        android:id="@+id/imgTag"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight=".8"
        app:strokeWidth = "1dp"
        android:src="@drawable/thumb"
        app:tagColor = "#CCFFFFFF"
        app:textColor = "#CCFFFFFF"
        app:taggable = "true"
        app:colorFilled = "false"
        />
ImageTagger tagger;
Button btnDelete;
TextView lblTagDesc;

tagger = (ImageTagger)findViewById(R.id.imgTag);
        btnDelete = (Button)findViewById(R.id.delete_tag);
        lblTagDesc = (TextView)findViewById(R.id.lbl_tag_desc);
        tagList = new ArrayList<>();
        
	Tag tag1 = new Tag(733.63f,674.41f,"Some Brand");
        Tag tag2 = new Tag(409.35f,1049.58f,"Bag");

        tagList.add(tag1);
        tagList.add(tag2);

        tagger.setTagList(tagList);

        final Dialog dialog = new Dialog(MainActivity.this);

        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.setContentView(R.layout.tag_description_dialog);

        Button btnOk = (Button) dialog.findViewById(R.id.btnOk);
        final EditText tagDescription = (EditText)dialog.findViewById(R.id.txtTagDescription);

        btnOk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Tag currentTag = tagger.getLastTag();
                currentTag.setTagDescription(tagDescription.getText().toString());
                Log.w(TAG, "setTagDescription: "+currentTag.getTagDescription() );
                tagDescription.setText(null);
                dialog.dismiss();
                updateLabel();
            }
        });

        //dialog.getWindow().setLayout(400,400);

        tagger.showTagDescriptionDialog(dialog);

        btnDelete.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                tagger.deleteLastTag();
                updateLabel();
            }
        });

        updateLabel();

##Contact

Ahmet Nazim Macit
email: [email protected]

imagetag's People

Contributors

titabit avatar ahmetn87 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.