why define android activity result_ok -1 -



why define android activity result_ok -1 -

/** standard activity result: operation succeeded. */ public static final int result_ok = -1;

why define result_ok -1 in android activity,not 1?

as why "-1" chosen, 1 can guess. best guess android trying ensure result_ok not collide user-defined constants. is, when develop activity , define own response codes, chose positive integer values. if result_ok "1", there higher probability app developer might chose well.

just theory.

android android-activity

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -