在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ Android問答
離人歸 回答

請(qǐng)檢查圖片所在的文件夾,drawable文件夾是有好幾個(gè)的,如果你只要這一個(gè)像素類型的圖片,建議把他/它放在drawable-hdpi

虛擬機(jī)上可以,但真機(jī)不行可能就是因?yàn)樯鲜龅脑?/p>

H5中使用js方法與本地調(diào)用,獲取本地的登錄信息。
用的cookie的話,用webview將cookie信息同步一下

情皺 回答
只要找到View(ViewHolder)顯示隱藏的調(diào)用函數(shù),就能計(jì)算出每個(gè)View(ViewHolder)的顯示時(shí)長(zhǎng)。

很幸運(yùn)的時(shí),RecyclerView提供了這樣的接口函數(shù),而且還是兩對(duì)接口函數(shù):

1.RecyclerView#Adapter提供了一對(duì)函數(shù):onViewAttachedToWindow(VH)onViewDetachedFromWindow(VH)

public abstract static class Adapter<VH extends ViewHolder> {
    ... ...
    
    /**
     * Called when a view created by this adapter has been attached to a window.
     *
     * <p>This can be used as a reasonable signal that the view is about to be seen
     * by the user. If the adapter previously freed any resources in
     * {@link #onViewDetachedFromWindow(RecyclerView.ViewHolder) onViewDetachedFromWindow}
     * those resources should be restored here.</p>
     *
     * @param holder Holder of the view being attached
     */
    public void onViewAttachedToWindow(VH holder) {
    }

    /**
     * Called when a view created by this adapter has been detached from its window.
     *
     * <p>Becoming detached from the window is not necessarily a permanent condition;
     * the consumer of an Adapter's views may choose to cache views offscreen while they
     * are not visible, attaching and detaching them as appropriate.</p>
     *
     * @param holder Holder of the view being detached
     */
    public void onViewDetachedFromWindow(VH holder) {
    }

    ... ...
}

2.RecyclerView提供了OnChildAttachStateChangeListener接口:

public interface OnChildAttachStateChangeListener {

    /**
     * Called when a view is attached to the RecyclerView.
     *
     * @param view The View which is attached to the RecyclerView
     */
    void onChildViewAttachedToWindow(View view);

    /**
     * Called when a view is detached from RecyclerView.
     *
     * @param view The View which is being detached from the RecyclerView
     */
    void onChildViewDetachedFromWindow(View view);
}

上面的兩對(duì)接口函數(shù),根據(jù)情況選用其一就好了,基本實(shí)現(xiàn)邏輯:

  1. 設(shè)置兩個(gè)變量,一個(gè)用來(lái)保存AttachedToWindow被調(diào)用時(shí)的時(shí)間戳,一個(gè)用來(lái)保存顯示的總時(shí)長(zhǎng)
  2. DetachedFromWindow被調(diào)用時(shí),計(jì)算與AttachedToWindow的時(shí)間戳差值,并將AttachedToWindow的時(shí)間戳清零,然后總時(shí)長(zhǎng)加上這個(gè)差值
  3. AttachedToWindow后,DetachedFromWindow未被調(diào)用前,只需獲取當(dāng)前系統(tǒng)時(shí)間戳,然后計(jì)算與AttachedToWindow的時(shí)間戳差值,再加上總時(shí)長(zhǎng),就是總時(shí)長(zhǎng)
巷尾 回答

webview 是一個(gè)控件,何來(lái)升級(jí)一說(shuō)?

使勁操 回答

我當(dāng)年在學(xué)校做項(xiàng)目的時(shí)候用過(guò)Ionic,就是一個(gè)Cordova的封裝,效率是真的高,直接使用angular.js做移動(dòng)應(yīng)用,啟動(dòng)速度是沒有辦法,混合應(yīng)用就是這樣子的,React Native的似乎會(huì)快一些

冷咖啡 回答

樓主,應(yīng)該是看了 《Android開發(fā)藝術(shù)探索》當(dāng)中的第八章,對(duì)Window的理解吧? 作者在后面留了一個(gè)問題就是樓主你提的問題:

這里我也看了,從Activity啟動(dòng)的attach就能看出來(lái)是無(wú)限的,因?yàn)閃indow的唯一實(shí)現(xiàn)類是PhoneWindow,比如說(shuō)我現(xiàn)在啟動(dòng)一個(gè)Activity,在ActivityThread中開始,調(diào)用啟動(dòng)Activity,到最后的實(shí)例化完成Activity之后會(huì)調(diào)用Activity的 attach方法,該方法中就對(duì) PhoneWindow做了實(shí)例化。

final void attach(Context context, ActivityThread aThread,
            Instrumentation instr, IBinder token, int ident,
            Application application, Intent intent, ActivityInfo info,
            CharSequence title, Activity parent, String id,
            NonConfigurationInstances lastNonConfigurationInstances,
            Configuration config, String referrer, IVoiceInteractor voiceInteractor,
            Window window) {
        ···
        mWindow = new PhoneWindow(this, window);
        ···
    }

可以私信探討!

莫小染 回答

你可以將jdbc.yaml文件命名為application-jdbc.yaml。
在啟動(dòng) spring-boot 時(shí)設(shè)置 jvm 參數(shù) -Dspring.profiles.active=jdbc 即可,這樣 spring-boot 會(huì)加載 application.yaml 配置文件和對(duì)應(yīng)的 profile 配置文件。

多個(gè)profile采用英文逗號(hào)分隔

$ java -Dspring.profiles.active=jdbc,jdbc2 -jar [xxx].jar
凹凸曼 回答

程序閃退,會(huì)在控制臺(tái)打印出異常的,先看看異常,報(bào)什么錯(cuò)誤

pageshow 和pagecreate 聯(lián)合使用被

舊城人 回答

找到了問題原因

build.gradle里面用的api版本 是 28之前選擇虛擬機(jī)選擇的api等級(jí)是 27 ,然后項(xiàng)目里用了28的api,所以報(bào)錯(cuò),虛擬機(jī)改用28的api就沒錯(cuò)了

clipboard.png

假灑脫 回答

自己寫邏輯,點(diǎn)擊全選后,將a,b,c設(shè)置為與全選按鈕一樣的狀態(tài)。代碼如下:

allSelect(){
   a = allse;
   b = allse;
   c = allse;
}
陌離殤 回答

我像問一下你用這個(gè)插件做沒做橡皮擦功能

汐顏 回答

兩種方案都是可行的

你們iOS寫不來(lái)第一種
你們Android寫不來(lái)第二種