2019年1月19日 星期六

現在學安卓原生真的不適合了嗎?安卓混合開發是什麼

Android原生以後還是很重要的,現在的手機,以後的物聯網都是Android的天下。
小程序是一個臨時性的產物,上有App體驗比小程序好太多,也能夠接入微信體系。
下有PWA,用Web作為仿App體驗。小程序本身並沒有什麼優勢。
由於國內並不掌握操作系統。那天Google和Apple出台政策。小程序就到了生命週期劇終。
1
Price_glx
Price_glx 
還是老老實實學原生吧,混合開發我就用過weex,呵呵,那幾天真的想罵人。
0
FLADIMIR
FLADIMIR 
原生還是最重要的,其他的像小程序,Flutter也有一定的市場;
無論你看起來多火,原生永遠是大頭
0
A
ar5500 
各種框架看的想哭,跑起來都不如原生快

5G對手機有什麼影響,剛看一則視頻,說未來將是雲安卓時代,不需要追求配置了,多少G內存已無意義?

5G對手機有什麼影響,剛看一則視頻,說未來將是雲安卓時代,不需要追求配置了,多少G內存已無意義?.



1
自由PHP
自由PHP 
4G理論值100Mbps,目前實測最高的是三星,也才三十多,信號不好的時候連網頁都刷不出來,心累,想想還是wifi好
0
張金富
張金富 
安卓要成棄子了還雲安卓
心有千千問
心有千千問 
安卓怎麼成棄子了?
0
毛褲
毛褲 
嗯5G華為測速2.7G每秒,網線還是10M /哭笑
0
冰雪舊痕
冰雪舊痕 
5G = 5th Generation = 第五代,
指網絡通訊技術的第五代。
這裡的G(Generation)是代,不是數據計量單位那個G(GigaBytes),跟你內存多少G沒幾把關係。

吹噓什麼雲什麼時代的,多半是炒作概念的大忽悠,建議當屁處理。

2013年11月20日 星期三

Android 4.4 KitKat

New NFC capabilities through Host Card Emulation  近场通信。
 
Printing Framework可以给app加上打印功能。

Storage access framework  document provider什么的。
 
Low-power sensors hardware sensor batching,优化了传感器的工作模式,减小电量消耗。
 
Step Detector and Step Counter
  Android 4.4加了两个新的集成传感器:step detector和step counter.
  可以在用户走路、跑步和上楼梯的时候计步数。
Android 4.4提出了新的过场动画的Transitions framework
  可以定义scene,也可以不定义scene,直接对UI进行动画。使用TransitionManager类。
  动画加入了pause()和resume()方法,支持暂停和恢复播放。
增加了透明的UI风格,包括状态bar和导航bar(有轻微渐变)。
加强的notification获取。
Chromium WebView
  Android 4.4提供了WebView全新的实现,基于Chromium.
  新的Chromium WebView提供了更广泛的支持:HTML5,CSS3,JavaScript。JavaScript Engine(V8).
  支持使用Chrome DevTools远程调试。
New media capabilities:
  录屏。Android4.4 提供了录屏工具。
  将手机用USB和你的Android SDK环境连接,就可以开启和停止录屏。

 

Your Branding

  可以使用品牌颜色: Branding color, 可以使用自己的颜色覆盖掉Android framework在UI元素中默认的蓝色。
 

Touch feedback

 
  在KitKat之前,Android默认的点击反馈颜色是鲜亮的蓝色,这样的话,点击会造成高对比度的颜色,这种颜色有可能和你的应用不搭。
  KitKat之后,点击反馈被减弱,当某样东西被点击,它的颜色会轻微地变亮或者变暗
  这样的好处是:
  1.相比于突兀的颜色变化,这样的反馈更加愉悦。
  2.可以更和谐地和品牌颜色共处,因为默认的反馈和什么样的色调都很搭。
 

Full Screen

 
  Android 4.4开始,Android提供了两种方法进入全屏:
  Lean BackImmersive
  这两种模式的不同之处在于用户如何再呼出bar来。
 
  Lean Back模式下,点击屏幕的任何地方都可以呼出系统bar。
  适用于看视频之类的,用户不需要和屏幕有很多交互的。
 
  Immersive模式下,用户需要从边缘滑动来呼出隐藏的bar。
  这种模式下,用户需要和全屏的屏幕交互,比如玩游戏,看gallery中的图像,或者阅读书和slides。
  在这种模式下,用户和屏幕的交互不会被突然意外的触碰和滑动打断。
 
  对于从屏幕边缘的滑动也不想被打断的应用,比如特殊的游戏或者绘图应用,可以使用Immersive模式的变种方法,将用户的swip操作返回给app,      让app响应这个操作。
  (本来呼出bar是有framework掌管的,app不知道这个手势的发生)。
  比如用户要画一条从屏幕边缘出来的线,这时候可以呼出bar,同时让app画出这条线,但是让bar变成半透明的,并且用户点击其他位置或者几秒后无操作,就自动退回。
 
 

Gesture

 
  Android 4.4引进了新的手势:double touch drag和double touch。
  这两个手势可以用来进行双击缩放。
  为了区分到底是缩小还是放大,在Google Maps和新版的Chrome Beta中,双击拖动能起到定向放大的作用。比如向上拖动是放大,向下拖动是缩小。
 
 

参考资料: 

2013年10月25日 星期五

JQUERY Mobile cache問題

TableLayout

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:stretchColumns="0,1,2"
    >
<TableRow>
<Button
    android:id="@+id/Button1"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Button1"
    />
<Button
    android:id="@+id/Button2"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Button2"
    android:layout_span="2"
    />
</TableRow>
<TableRow>
<Button
    android:id="@+id/Button3"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Button3"
    />
 <Button
    android:id="@+id/Button4"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Button4"
    />
   <Button
    android:id="@+id/Button5"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Button5"
    />
</TableRow>
</TableLayout>

2013年10月20日 星期日

popupwindow-彈出對話框

原文地址:http://code.eoe.cn/169
上方網址有demo檔案
/***
 * PopupWindow
 * 
 * @author zhangjia
 * 
 */
public class MainActivity extends Activity {
 private Button button;
 private PopupWindow popupWindow;
 private LinearLayout layout;
 private ListView listView;
 private String title[] = { "全部", "我的微博", "周边", "智能排版", "同学" };

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.main);
  button = (Button) findViewById(R.id.tv_title);
  button.setOnClickListener(new OnClickListener() {
   @Override
   public void onClick(View v) {
    button.getTop();
    int y = button.getBottom() * 3 / 2;
    int x = getWindowManager().getDefaultDisplay().getWidth() / 4;

    showPopupWindow(x, y);
   }
  });
 }

 public void showPopupWindow(int x, int y) {
  layout = (LinearLayout) LayoutInflater.from(MainActivity.this).inflate(
    R.layout.dialog, null);
  listView = (ListView) layout.findViewById(R.id.lv_dialog);
  listView.setAdapter(new ArrayAdapter<String>(MainActivity.this,
    R.layout.text, R.id.tv_text, title));

  popupWindow = new PopupWindow(MainActivity.this);
  popupWindow.setBackgroundDrawable(new BitmapDrawable());
  popupWindow
    .setWidth(getWindowManager().getDefaultDisplay().getWidth() / 2);
  popupWindow.setHeight(300);
  popupWindow.setOutsideTouchable(true);
  popupWindow.setFocusable(true);
  popupWindow.setContentView(layout);
  // showAsDropDown会把里面的view作为参照物,所以要那满屏幕parent
  // popupWindow.showAsDropDown(findViewById(R.id.tv_title), x, 10);
  popupWindow.showAtLocation(findViewById(R.id.main), Gravity.LEFT
    | Gravity.TOP, x, y);//需要指定Gravity,默认情况是center.

  listView.setOnItemClickListener(new OnItemClickListener() {

   @Override
   public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
     long arg3) {
    button.setText(title[arg2]);
    popupWindow.dismiss();
    popupWindow = null;
   }
  });
 }

}