Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビットマップを文字列に変換すると toString()、android.graphics.Bitmap@40da7c08. 比較できるように、その名前は常に同じにしたいのです。それを行う方法はありますか?
toString()
ビットマップクラスを拡張し、別のメソッドを追加して、理解できる一意の識別子を生成することをお勧めします。
toString()これは、 のメソッドのデフォルトの実装ですJava。基本的には、クラスの完全に分類された名前の後hexcodeにオブジェクトの が続きます。
Java
hexcode
メソッドに基づいて比較を行うequals()か、オブジェクトをクラス内にラップしてBitmap、name または id プロパティを追加することをお勧めします。
equals()
Bitmap