Shanghai Bund

上海外滩是上海十大景点之一,有着殖民历史印记。19世纪末20世纪初是国际金融政治中心。曾因历史变迁被破坏,1992年后开始复兴,如今恢复中央商务区功能,是市民休闲、晨练好去处,还能欣赏浦东美景,未来河岸综合开发将拓展其魅力。

http://spaces.msn.com/members/sevencastles/

 

Being one of the Top Ten Shanghai Attractions, Shanghai Bund is a must-visit place starting from the Garden Bridge, which is at the connecting point of the Huangpu River and the Suzhou Creek, to the Jinling Road East and winding a length of 1500 meters. The most visible reminder of Shanghai's colonial heritage, the Bund attracts millions of visitors from home and abroad each year.

 

"Bund" derives from an Anglo-Indian word for an embankment along a muddy waterfront and that is what it was at the beginning when the first British company opened an office there in 1846. The Bund became the site of some of the earliest foreign settlements after Shanghai was opened as one of five "Treaty Ports" specified in the Nanjing Treaty that ended the Opium War in 1842. Because of its proximity to the Yangtze River - the path into central China, Shanghai grew rapidly as the economic center of foreign interests.

 

In the late 19th and early 20th centuries, the Bund became the financial and political center of the international community in China. It was China's Wall Street, as Shanghai's financial market became the third largest in the world (behind London and New York). Nearby were located a number of important consulates, including the British, American, Russian and Japanese.

 

The most famous and attractive sight which is at the west side of the Bund is a "museum of international architecture" with the various buildings of different architectural styles including Gothic, Baroque, Romanesque, Classicism and the Renaissance, making the picturesque Bund more European than Chinese in character. Although they were not designed by the same person or built in the same period, they achieved a harmonic outline when viewed as a whole.

 

Unfortunately, since 1949, many of the structures were subdivided into government offices, department stores or storage areas, furnishings were sold off or destroyed, and architectural features covered.

 

The Bund was left dark for decades. However, great change took place with the revitalization of Shanghai, strongly encouraged by a visit of Deng Xiaoping in 1992. The next year the plans for the Bund were finalized and the renewal of Shanghai began in earnest. The Bund resumes its role as a central business district (CBD) and now the lights are coming back up.

 

The flower-stands together with street lamps have become the resort place as well as sightseeing for the ordinary people. The Bund is one of the favorite morning exercise spots for Shanghai's early risers. It also offers a captivating view of the modern Pudong with its Oriental Pearl TV Tower and numerous majestic skyscrapers. After sunset the view becomes even better. When lights are turned on between 7:00 and 9:00 p.m., the Bund has the best nocturnal scene to offer.

 

Many years ago, a "Lover's Wall" made the Bund more romantic. The 500-metre section between Beijing Road East and Yan'an Road East was packed with lovers kissing and hugging, regardless of the reproachful glances cast by passer-bys!

 

Today, the comprehensive development of river bank areas has been progressing positively and steadily for "the pride of the century", the glamour of the Bund will extend to the South Bund in Huangpu, North Bund in Hongkou and East Bund in Yangpu.

在 Android 开发中,`Bundle` 是一个重要的类,主要用于在组件之间传递数据。它是一个键值对的集合,可以存储多种类型的数据(如基本数据类型、字符串、Parcelable 对象等),常用于 `Activity` 之间或 `Fragment` 之间的通信[^1]。 ### Bundle 的基本用法 #### 创建和使用 Bundle 可以通过直接实例化 `Bundle` 或从 `Intent` 中获取来创建对象: ```java // 创建一个新的 Bundle 实例 Bundle bundle = new Bundle(); // 向 Bundle 中添加数据 bundle.putString("key_string", "Hello, Bundle!"); bundle.putInt("key_int", 42); // 通过 Intent 发送 Bundle Intent intent = new Intent(this, TargetActivity.class); intent.putExtras(bundle); startActivity(intent); ``` 在目标 `Activity` 中接收数据: ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_target); if (savedInstanceState != null) { String receivedString = savedInstanceState.getString("key_string"); int receivedInt = savedInstanceState.getInt("key_int"); } } ``` #### 数据类型的多样性支持 `Bundle` 支持多种数据类型的存取操作,包括但不限于: - 基本类型(int、float、boolean 等) - 字符串(String) - Parcelable 和 Serializable 类型的对象 - 数组与集合类型(如 ArrayList<String>) 示例:添加和读取 Parcelable 对象: ```java // 假设 MyData 是实现了 Parcelable 接口的类 MyData data = new MyData(); bundle.putParcelable("key_data", data); // 在目标位置读取 MyData receivedData = bundle.getParcelable("key_data"); ``` ### Bundle 的实现细节 #### 内部结构 `Bundle` 实际上是基于 `Parcel` 的封装,利用了 Android 的 Binder 进程间通信机制来实现跨组件的数据传输。其内部维护了一个 `Map` 结构,将键值对以扁平化的形式序列化到 `Parcel` 中,从而实现高效的跨进程数据传递。 #### 性能优化 由于 `Bundle` 依赖于 `Parcel`,因此在使用时需要注意性能问题。对于大数据量或频繁传递的情况,应尽量避免使用 `Bundle`,而是采用更高效的方式(如全局变量、单例模式或数据库存储)进行处理。 #### 生命周期管理 `Bundle` 也广泛用于保存和恢复界面状态。例如,在 `Activity` 被销毁并重新创建时,系统会自动调用 `onSaveInstanceState()` 方法,并将当前状态保存到 `Bundle` 中,以便在重建时恢复。 ```java @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); // 保存状态 outState.putString("saved_state_key", "Some value"); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { String savedValue = savedInstanceState.getString("saved_state_key"); } } ``` #### 可见性控制与资源释放 虽然 `Bundle` 本身不涉及可见性控制,但结合 `Activity` 或 `Fragment` 的生命周期,开发者可以通过设置标志位或手动清空 `Bundle` 来优化内存使用。例如,在不再需要某些临时数据时,可以调用 `remove()` 方法清除特定键值,或者使用 `clear()` 清空整个 `Bundle`。 ```java bundle.remove("key_to_remove"); bundle.clear(); ``` ### 应用场景 - **跨组件通信**:如 `Activity` 或 `Fragment` 之间的数据传递。 - **状态保存与恢复**:用于保存用户界面的状态,确保在配置变更(如屏幕旋转)后能够正确恢复。 - **模块化开发中的参数传递**:在模块化架构中,`Bundle` 可作为模块间接口参数的载体,简化模块间的耦合度。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值