加速Android開發的工具類:Caffeine

jopen 10年前發布 | 16K 次閱讀 Caffeine Android開發 移動開發

一個工具類的集合,它有助于使Android的開發速度更快(更安全!)。具體如下:

</tr> </tbody>

Class Description
ActivityUtils

Utility methods for common Activity code
</td> </tr>

CountUtil

Utility methods for formatting counts
</td> </tr>

DialogUtils

Utility methods used to show a quick pop-up dialog.
</td> </tr>

MiscUtils

A class for toys that do not have a home.
</td> </tr>

PhoneUtils

常用照片處理方法 Common phone utility methods
</td> </tr>

StrictModeUtils

Used to turn on strict mode for Dev builds
</td> </tr>

ToastUtils

Toast message utilities.
</td> </tr>

ViewUtils

Utility methods that make working with views easier, less error prone, and more concise.
</td> </tr> </tbody> </table>

示例

No more unsafe type casting scattered throughout your code:

TextView x = ViewUtils.findViewById(this, R.id.my_text)
ImageView y = ViewUtils.findViewById(this, R.id.my_image)
LinearLayout z = ViewUtils.findViewById(this, R.id.my_layout)

Some handy 1-liners:

ActivityUtils.launchActivity(this, SomeNewActivity.class);
DialogUtils.quickDialog(this, "Some awesome message");
ToastUtils.quickToast(this, "Some toast message");

項目主頁:http://www.baiduhome.net/lib/view/home/1414549550247

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
  • sesese色