1 Star 0 Fork 0

OSCHINA-MIRROR/HarmonyOS-tpc-BottomDialog

Join Gitlife
Discover and participate in excellent open source projects with over 10 million developers. Private repositories are also completely free :)
Join for free
Clone/Download
Contribute code
Sync code
Cancel
Hint: Since Git does not support empty folders, creating a folder will generate an empty .keep file.
Loading...
README.md

BottomDialog_openharmony

Предварительный просмотр

image

Интеграционная конфигурация

Способ один:
Через library сгенерировать har-пакет, добавить har-пакет в папку libs
В entry в Gradle добавить следующий код:
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
Способ два:
allprojects{
    repositories{
        mavenCentral()
    }
}

implementation 'io.openharmony.tpc.thirdlib:bottomDialog-library:1.0.0'

1. Использование оболочки BaseDialog

public class BottomDialog extends BaseOsDiaLog { private Context mContext;

public BottomDialog(Context context) {
    super(context);
    this.mContext = context;
}

@Override
protected int getDiaLogLayout() {
    return ResourceTable.Layout_dialog_bottom_share;
}

@Override
protected int getAlignment() {
    return TextAlignment.BOTTOM;
}

@Override
protected DiaLogSize getDiaLogSize() {
    return new DiaLogSize(DisplayUtils.getWindowWidth(mContext), 300);
}

@Override
protected void onCreateDiaLog(Component component) {
    super.onCreateDiaLog(component);
    // Логическая обработка

}

public static void showBottomDialog(Context context) {
    new BottomDialog(context)
            .setAutoClosable(true)
            .show();
}

}

2. Использование в main

BottomDialog.showBottomDialog(this);

Лицензия

Copyright 2016 shaohui10086

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments ( 0 )

You can comment after Login

Introduction

No description available Expand Collapse
Apache-2.0
Cancel

Releases

No releases yet

Contributor

All

Recent Activities

Load more
No more results to load
1
https://gitlife.ru/oschina-mirror/HarmonyOS-tpc-BottomDialog.git
git@gitlife.ru:oschina-mirror/HarmonyOS-tpc-BottomDialog.git
oschina-mirror
HarmonyOS-tpc-BottomDialog
HarmonyOS-tpc-BottomDialog
master